Skip to content

Commit cb357fd

Browse files
committed
[Tests] Update tests to run on io.js with the latest version of jest
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. Test Plan: Run `npm test` with the latest version of jest.
1 parent 951b5f9 commit cb357fd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ install:
1515
- cp $(brew --prefix nvm)/nvm-exec .nvm/
1616
- export NVM_DIR=.nvm
1717
- source $(brew --prefix nvm)/nvm.sh
18-
- nvm install v0.10
18+
- nvm install iojs-v2
1919
- npm config set spin=false
2020
- npm install
2121

2222
script:
2323
- |
24-
nvm use v0.10
24+
nvm use iojs-v2
2525
2626
if [ "$TEST_TYPE" = objc ]
2727
then

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"yargs": "1.3.2"
7373
},
7474
"devDependencies": {
75-
"jest-cli": "0.4.5",
75+
"jest-cli": "facebook/jest#0.5.x",
7676
"babel-eslint": "3.1.5",
7777
"eslint": "0.21.2",
7878
"eslint-plugin-react": "2.3.0"

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)