-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
chore(tests): Make integration tests passing on Node 7 #4606
Conversation
…act-scripts is not compatible with it, this skips test on node v7 which is used within yarn's Docker. Summary of all failing tests FAIL __tests__/integration.js (182.903s) ● yarn add react-scripts@1.0.13 expect(received).not.toMatch(expected) Expected value not to match: /^warning /gm Received: "warning You are using Node \"7.10.1\" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: \"^4.8.0 || ^5.7.0 || ^6.2.2 || ^8.0.0\"" at __tests__/integration.js:82:1793 at Generator.next (<anonymous>) at step (node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30) at node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13 at process._tickCallback (internal/process/next_tick.js:109:7)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot but I have an alternative which may be a better solution :)
__tests__/integration.js
Outdated
@@ -60,7 +60,8 @@ addTest('https://github.com/yarnpkg/yarn/releases/download/v0.18.1/yarn-v0.18.1. | |||
addTest('https://github.com/bestander/chrome-app-livereload.git'); // no package.json | |||
addTest('bestander/chrome-app-livereload'); // no package.json, github, tarball | |||
// Only run `react-scripts` test on Node 6+ | |||
if (parseInt(process.versions.node.split('.')[0], 10) >= 6) { | |||
const nodeMajorVersion = parseInt(process.versions.node.split('.')[0], 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still support Node 4 AFAIK. I think a better option would be to add the --no-node-version-check
option to yarn invocations.
Just to clarify, the alternative is what I mentioned in the inline comment. |
… to make it work on node v4
…ke it work on node v4
OK, this is done. Altered function signature ( |
**Summary** The change introduced in 96c215c caused tests to fail on node 7 as react-scripts is not compatible with it. This patch adds `--ignore-engines` flag to suppress the warning. **Test plan** Tests should pass on Node 7.
The change introduced in 96c215c caused tests to fail on node 7 as react-scripts is not compatible with it, this skips test on node v7 which is used within yarn's Docker.
I excluded this test for node v7, here's the reasoning behind it:
Node 7.x is no longer supported, so this should be completely fine.