CRA 2.x > 3.0 upgrade - test script with --watchAll=false never exits in docker build
See original GitHub issueIs this a bug report?
Yes
Did you try recovering your dependencies?
Created fresh brand new CRA app and reproduced
Which terms did you search for in User Guide?
docker, test
Environment
Environment Info:
System: OS: macOS 10.14.4 CPU: (4) x64 Intel® Core™ i7-7567U CPU @ 3.50GHz Binaries: Node: 10.15.1 - ~/.nvm/versions/node/v10.15.1/bin/node Yarn: Not Found npm: 6.4.1 - ~/.nvm/versions/node/v10.15.1/bin/npm Browsers: Chrome: 73.0.3683.103 Firefox: 66.0.3 Safari: 12.1 npmPackages: react: ^16.8.6 => 16.8.6 react-dom: ^16.8.6 => 16.8.6 react-scripts: 3.0.0 => 3.0.0 npmGlobalPackages: create-react-app: Not Found
Original issue found on a shared gitlab pipeline runner
Steps to Reproduce
- Add watchAll=false to test script
- Add
npm test
in a Dockerfile stage - Run
docker build .
Expected Behavior
Docker should continue to the next step after running the test script
Actual Behavior
> docker-test@0.1.0 test /app
> react-scripts test --watchAll=false
PASS src/App.test.js
✓ renders without crashing (45ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 2.247s
Ran all test suites.
Never continues
Reproducible Demo
https://github.com/bvalyou/create-react-app-docker-test-issue
Clone, run docker build .
- reaches test script and never continues
In my main project the CI build timed out after one hour
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:11
Top GitHub Comments
That worked, thanks! Maybe we should add a note to the breaking changes list for 3.0 that the CI env variable is now required for test builds to work on docker.
Fixed as part of 3.1 release.