mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 20:25:33 +08:00
Update jest to 0.7.1
Reviewed By: frantic Differential Revision: D2614935 fb-gh-sync-id: 64cc4fb439f0c53f0eb0588c22e0291813a7e334
This commit is contained in:
committed by
facebook-github-bot-7
parent
59ed90dd5f
commit
7041a22bd0
@@ -22,6 +22,7 @@ var net = require('net');
|
||||
describe('SocketServer', () => {
|
||||
let netServer;
|
||||
let bunser;
|
||||
let processOn;
|
||||
|
||||
beforeEach(() => {
|
||||
const {EventEmitter} = require.requireActual('events');
|
||||
@@ -32,6 +33,14 @@ describe('SocketServer', () => {
|
||||
bunser = new EventEmitter();
|
||||
bser.BunserBuf.mockImpl(() => bunser);
|
||||
bser.dumpToBuffer.mockImpl((a) => a);
|
||||
|
||||
// Don't attach `process.on('exit')` handlers directly from SocketServer
|
||||
processOn = process.on;
|
||||
process.on = jest.genMockFn();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
process.on = processOn;
|
||||
});
|
||||
|
||||
pit('create a server', () => {
|
||||
|
||||
Reference in New Issue
Block a user