Skip to content
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

Merged
merged 1 commit into from
Jul 2, 2015

Conversation

ide
Copy link
Contributor

@ide ide commented May 23, 2015

[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.

Test Plan: Run npm test with the latest version of jest.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 23, 2015
@ide ide force-pushed the iojs-tests branch 2 times, most recently from 5c2af7e to 627af26 Compare May 23, 2015 07:22
@ide
Copy link
Contributor Author

ide commented May 29, 2015

Fixes #1412

@sahrens
Copy link
Contributor

sahrens commented Jun 11, 2015

Looks like the tests failed, so back to you.

@ide
Copy link
Contributor Author

ide commented Jun 11, 2015

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.

@amasad
Copy link
Contributor

amasad commented Jun 15, 2015

I think we're interested to get FB on v0.12. In fact, a few projects started upgrading. cc @DmitrySoshnikov

@ide ide changed the title [Tests] Update tests to run on io.js with the latest version of jest (DO NOT MERGE) [Tests] Update tests to run on io.js with the latest version of jest Jul 1, 2015
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.
@a2
Copy link
Contributor

a2 commented Jul 1, 2015

@facebook-github-bot import

@facebook-github-bot
Copy link
Contributor

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.

a2 pushed a commit to a2/react-native that referenced this pull request Jul 1, 2015
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.
@a2 a2 merged commit 212bd22 into facebook:master Jul 2, 2015
@ide ide deleted the iojs-tests branch July 2, 2015 18:35
cpojer pushed a commit to facebook/metro that referenced this pull request Jan 26, 2017
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.
ayushjainrksh pushed a commit to MLH-Fellowship/react-native that referenced this pull request Jul 2, 2020
* Fix lint rules in v0.51

* Fix up .alexignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants