Skip to content

Commit

Permalink
Fix test on node 4. (jestjs#2542)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpojer authored Jan 9, 2017
1 parent 2f0067e commit 0d3b89f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/jest-cli/src/__tests__/watch-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ const runJestMock = jest.fn();
jest.mock('jest-util', () => ({clearLine: () => {}}));
jest.doMock('chalk', () => new chalk.constructor({enabled: false}));
jest.doMock('../constants', () => ({CLEAR: '', KEYS}));
jest.doMock('../runJest', () => (...args) => {
runJestMock(...args);
jest.doMock('../runJest', () => function() {
const args = Array.from(arguments);
runJestMock.apply(null, args);

// Call the callback
args[args.length - 1]({snapshot: {}});
Expand Down

0 comments on commit 0d3b89f

Please sign in to comment.