-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Make tests pass using Node 5 / NPM 3 #832
Comments
I'll give this a try |
I removed the nesting node_modules in |
Related: jestjs/jest#554 |
Okay so based on that issue and also related: facebook/react#5183, the issue is with jest and to solve it you unmock all the deps, except for 3 packages that are needed to pass the tests.
1167 tests passed (1167 total in 96 test suites, run time 60.464s) 🎉 |
Make tests pass using Node 5 / NPM 3 facebook#832 Make tests pass using Node 5 / NPM 3 facebook#832 Make tests pass using Node 5 / NPM 3 facebook#832
I'll publish a new version of |
Summary:This fixes unmock resolution for node_modules when using npm3. The way this is solved is by checking whether the parent dependency is unmocked and both modules are within a `node_modules` folder. This has taken a while, mainly because it required #599 to be merged. I also added some more caching that makes test runs even faster. The react-native test suite now completes in about 6s (down from 7.5-8s). There might be more in the near future ;) This fixes #554, #730, facebook/react#5183, facebook/relay#832 and will be part of 0.9.0. I'll publish 0.9.0-fb3 today with this fix. Closes #732 Differential Revision: D2959610 fb-gh-sync-id: c374b7a2bcdfddf768905356a08948d9156eb028 shipit-source-id: c374b7a2bcdfddf768905356a08948d9156eb028
Summary:0.9.0-fb3 comes with all those sweet npm3 fixes. Also see #840 and #832. Tests are passing for me on node4 both with npm2 and npm3. See jestjs/jest@7b44ca0 and jestjs/jest@2d10421 cc kassens raineroviir Closes #877 Differential Revision: D2971806 fb-gh-sync-id: 85f2898f71df12eaf7f2b4bd6a2e641305453b45 shipit-source-id: 85f2898f71df12eaf7f2b4bd6a2e641305453b45
Summary: Closes #840 Reviewed By: yungsters Differential Revision: D2981190 fb-gh-sync-id: a16e9c1b8cc1bd23513a5c4d9181c7612355f291 shipit-source-id: a16e9c1b8cc1bd23513a5c4d9181c7612355f291
We've been running node 5 for a while on travis by now. |
Right now, if you
npm install
using Node >=5 and NPM >=3 you'll run into a bunch of problems.Most of these are due to the fact that npm installs dependencies in a flat directory structure, which makes the paths in
unmockedModulePathPatterns
(seepackage.json
) no longer match.Another problem is that the paths in our
.flowconfig
files may no longer match.There are undoubtedly other problems.
The task is to make
npm test
pass all-green with both NPM 2 & 3, or make it pass exclusively with NPM 3 and update theengines
config inpackage.json
if dual-compatibility is too much of a pain.The text was updated successfully, but these errors were encountered: