mirror of https://github.com/status-im/metro.git
Update jest to 0.7.1
Reviewed By: frantic Differential Revision: D2614935 fb-gh-sync-id: 64cc4fb439f0c53f0eb0588c22e0291813a7e334
This commit is contained in:
parent
e93b1f8411
commit
29befc8d1c
|
@ -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', () => {
|
||||
|
|
Loading…
Reference in New Issue