mirror of
https://github.com/status-im/metro.git
synced 2025-02-11 10:37:05 +00:00
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', () => {
|
describe('SocketServer', () => {
|
||||||
let netServer;
|
let netServer;
|
||||||
let bunser;
|
let bunser;
|
||||||
|
let processOn;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
const {EventEmitter} = require.requireActual('events');
|
const {EventEmitter} = require.requireActual('events');
|
||||||
@ -32,6 +33,14 @@ describe('SocketServer', () => {
|
|||||||
bunser = new EventEmitter();
|
bunser = new EventEmitter();
|
||||||
bser.BunserBuf.mockImpl(() => bunser);
|
bser.BunserBuf.mockImpl(() => bunser);
|
||||||
bser.dumpToBuffer.mockImpl((a) => a);
|
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', () => {
|
pit('create a server', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user