Skip to content

Commit

Permalink
[Tests] Update tests to run on io.js with the latest version of jest
Browse files Browse the repository at this point in the history
Summary:
[This is a preview diff for getting RN's tests to pass with a future version of jest that supports io.js and other future versions of Node. This can be merged once the diff to update jest is merged upstream and published.]

Updates the tests in small ways so they run on io.js with two updates:

 - The Cache test which relies on Promises uses `runAllImmediates` for modern versions of Node because bluebird uses `setImmediate` instead of `process.nextTick` for Node >0.10.

Closes facebook/react-native#1382
Github Author: James Ide <ide@jameside.com>

Test Plan:  Run `npm test` with the latest version of jest.
  • Loading branch information
ide committed Jul 1, 2015
1 parent 70dde86 commit 62431c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react-packager/src/JSTransformer/__tests__/Cache-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ describe('JSTransformer Cache', function() {
return Promise.resolve('baz value');
});

jest.runAllTicks();
jest.runAllImmediates();
expect(fs.writeFile).toBeCalled();
});
});
Expand Down

0 comments on commit 62431c7

Please sign in to comment.