-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tests] Update tests to run on io.js with the latest version of jest #1382
Conversation
5c2af7e
to
627af26
Compare
Fixes #1412 |
Looks like the tests failed, so back to you. |
Yeah, we need jestjs/jest#374 first, which is a breaking change to jest to get it running on io.js. One of jest's dependencies, jsdom, has dropped compatibility for legacy Node so jest needs to run on io.js in order to use a modern jsdom release. This PR is a rough cut at getting React Native working with io.js and the future version of jest with the aforementioned patch. I still want to get it running against Travis but it doesn't need immediate attention until the jest patch lands. On a related note, it's a big undertaking to get all of Facebook's JS on io.js and the next version of jest. If React Native's OSS tests are separate from the internal tests, it would be good to preserve that separation because I expect it will take considerable time and dedication for the rest of Facebook's codebase to catch up. |
I think we're interested to get FB on v0.12. In fact, a few projects started upgrading. cc @DmitrySoshnikov |
Updates the tests in small ways so they run on io.js with some 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.
@facebook-github-bot import |
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/413866812132000/int_phab to review. |
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 <ide@jameside.com> Test Plan: Run `npm test` 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/react-native#1382 Github Author: James Ide <ide@jameside.com> Test Plan: Run `npm test` with the latest version of jest.
* Fix lint rules in v0.51 * Fix up .alexignore
[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:
runAllImmediates
for modern versions of Node because bluebird usessetImmediate
instead ofprocess.nextTick
for Node >0.10.Test Plan: Run
npm test
with the latest version of jest.