npm test fails if the project doesn't have git
See original GitHub issueApparently Jest did this. Oops!
Determining test suites to run...
--watch is not supported without git/hg, please use --watchAll
npm ERR! Test failed. See above for more details.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
NPM update error - Fails to execute GIT - Stack Overflow
Try configuring your git to use https instead of git. That seems to work more frequently inside work networks.
Read more >Git error - Fatal: Not a git repository and how to fix it | Datree.io
This error means you attempted to run a Git command, but weren't inside a Git repository. Make sure you've: Navigated to the right...
Read more >How to Fix the “fatal: not a git repository” Error - ContainIQ
Check that you correctly created the repo. If the directory doesn't contain a .git repo, use git init to properly initialize the repo...
Read more >Troubleshooting CI/CD - GitLab Docs
If the merge train pipeline has failed, you can: Check the failure and determine if you can use the /merge quick action to...
Read more >@cypress/github-action - npm
Start using @cypress/github-action in your project by running `npm ... will be generated only if E2E test failed # thus we store screenshots ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Note that, unless somebody (probably meaning @mjesun) wants to do some cherry-picking, the next release of Jest will be a major, so any change we make to Jest will most likely not be something CRA can pick up before its next major. So a workaround in CRA makes sense regardless
I agree. From what I’ve been looking at, it seems to be that there was a regression introduced between
jest@20.x
which is whatcreate-react-app@1.15
uses andjest@22.0.0
. This was fixed by providing a better message for the exception, but still exiting with non-zero.I’m sure @cpojer might provide better insights, but here are my initial thoughts.
--watch
in non-VCS environments. (Which is how it used to behave.) Probably by just falling back to--watchAll
.--watch
to behave as expected.