Ejecting causes Jest config to contain absolute paths
Created by: SimenB
Describe the bug
Ejecting from a fresh CRA project puts "testRunner": "/Users/simen/repos/my-app/node_modules/jest-circus/runner.js"
in my Jest config in package.json, which will obviously only work on my machine (barring some weird coincidences)
Did you try recovering your dependencies?
N/A
Which terms did you search for in User Guide?
N/A
Environment
Environment Info:
System:
OS: macOS 10.15.7
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Binaries:
Node: 14.15.0 - ~/.nvm/versions/node/v14.15.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.8 - ~/.nvm/versions/node/v14.15.0/bin/npm
Browsers:
Chrome: 86.0.4240.111
Firefox: 81.0.2
Safari: 14.0
npmPackages:
react: ^17.0.1 => 17.0.1
react-dom: ^17.0.1 => 17.0.1
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
npx create-react-app my-app
cd my-app && yarn eject
- Look at Jest config in
package.json
Expected behavior
I'd expect it to see "testRunner": "jest-circus/runner"
in package.json
.
Actual behavior
I see "testRunner": "/Users/simen/repos/my-app/node_modules/jest-circus/runner.js"
instead
Reproducible demo
N/A