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

chore(tests): Make integration tests passing on Node 7 #4606

Merged
merged 4 commits into from
Oct 5, 2017
Merged

chore(tests): Make integration tests passing on Node 7 #4606

merged 4 commits into from
Oct 5, 2017

Conversation

viatsko
Copy link
Contributor

@viatsko viatsko commented Oct 1, 2017

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:

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)

Node 7.x is no longer supported, so this should be completely fine.

…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)
@viatsko viatsko changed the title The change introduced in 96c215c1ce5944a6fe993ab0d9b13e6edfe65675 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. The change introduced in 96c215c1ce5944a6fe993ab0d9b13e6edfe65675 caused tests to fail on node 7 Oct 1, 2017
Copy link
Member

@BYK BYK left a 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 :)

@@ -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);
Copy link
Member

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.

@BYK
Copy link
Member

BYK commented Oct 2, 2017

Thanks a lot but I have an alternative which may be a better solution :)

Just to clarify, the alternative is what I mentioned in the inline comment.

@arcanis arcanis changed the title The change introduced in 96c215c1ce5944a6fe993ab0d9b13e6edfe65675 caused tests to fail on node 7 Recent change caused tests to fail on node 7 Oct 3, 2017
@viatsko
Copy link
Contributor Author

viatsko commented Oct 5, 2017

OK, this is done. Altered function signature (addTest) and added --ignore-engines as well only for that test, since it's designed to check peerDependencies. Keeping other tests for yarn add as they are now.

@BYK BYK changed the title Recent change caused tests to fail on node 7 chore(tests): Make integration tests passing on Node 7 Oct 5, 2017
@BYK BYK merged commit 972166c into yarnpkg:master Oct 5, 2017
joaolucasl pushed a commit to joaolucasl/yarn that referenced this pull request Oct 27, 2017
**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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants