Skip to content

Commit 5aa2758

Browse files
committed
[Tests] Update tests to run on io.js with the latest version of jest
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#1382 Github Author: James Ide <[email protected]> Test Plan: Run `npm test` with the latest version of jest.
1 parent 7a8398b commit 5aa2758

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packager/react-packager/src/JSTransformer/__tests__/Cache-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ describe('JSTransformer Cache', function() {
229229
return Promise.resolve('baz value');
230230
});
231231

232-
jest.runAllTicks();
232+
jest.runAllImmediates();
233233
expect(fs.writeFile).toBeCalled();
234234
});
235235
});

0 commit comments

Comments
 (0)