[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 https://github.com/facebook/react-native/pull/1382
Github Author: James Ide <ide@jameside.com>

Test Plan:  Run `npm test` with the latest version of jest.
This commit is contained in:
James Ide 2015-07-01 12:52:10 -07:00
parent 70dde863ae
commit 62431c7f62
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ describe('JSTransformer Cache', function() {
return Promise.resolve('baz value');
});
jest.runAllTicks();
jest.runAllImmediates();
expect(fs.writeFile).toBeCalled();
});
});