Update jest to 0.7.1

Reviewed By: frantic

Differential Revision: D2614935

fb-gh-sync-id: 64cc4fb439f0c53f0eb0588c22e0291813a7e334
This commit is contained in:
Christoph Pojer 2015-11-04 14:33:48 -08:00 committed by facebook-github-bot-7
parent e93b1f8411
commit 29befc8d1c
1 changed files with 9 additions and 0 deletions

View File

@ -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', () => {