Tests are using code from npm instead of code from pull request
See original GitHub issuePossibly a regression from https://github.com/facebook/create-react-app/commit/5fecfee2373ebd1eda0c405b82a1c2d24afae6a1. Blocking #4837.
Is this a bug report?
Yes
Environment
System: OS: macOS 10.14 CPU: x64 Intel® Core™ i5-6267U CPU @ 2.90GHz Binaries: Node: 8.11.4 - /usr/local/bin/node Yarn: 1.10.1 - ~/.yarn/bin/yarn npm: 6.4.1 - /usr/local/bin/npm Browsers: Chrome: 69.0.3497.100 Firefox: 59.0.2 Safari: 12.0 npmPackages: @stiligita/react: 1.0.0-0 @types/react: 16.4.14 @types/react-dom: 16.0.8 react: 16.5.2 react-dom: 16.5.2 react-scripts: 2.0.5 (#4837) npmGlobalPackages: create-react-app: Not Found (#4837)
Steps to Reproduce
- Fork #4837
- Run
CI=false npx jest --config ./test/jest.config.js --testMatch '<rootDir>/**/typescript/*.test.js'
(pass) - Run
CI=true npx jest --config ./test/jest.config.js --testMatch '<rootDir>/**/typescript/*.test.js'
(fail)
Expected Behavior
Tests should pass because they are correct. CRA should use the current code of each pull request, not a version from npm.
Actual Behavior
TypeScript tests fails because it tries to use the cra version from npm, which doesn’t support typescript.
Reproducible Demo
Possibly related code
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
The tests are supposed to be using code from “npm” because the PR is published before the test are ran: https://github.com/facebook/create-react-app/blob/f89385f7438f39750b762590ebd9729534e30190/tasks/e2e-behavior.sh#L90-L100
I suspect our registry override might be wiped out, or similar.
Hmm, I’d like to figure out why this doesn’t work with PnP (it should).