"Starting Jest in Watch mode failed too many times" helper is not very helpful
See original GitHub issueEnvironment
-
node -v
: 12.9.1 -
yarn -v
: 1.21.1 -
npm ls jest
ornpm ls react-scripts
(if you haven’t ejected): react-scripts@3.3.0 -
your vscode-jest settings if customized:
- jest.pathToJest? yarn test
-
Operating system: macOS 10.15.2
Prerequisite
- are you able to run jest test from command line? yes
- how do you run your tests from command line? (for example:
npm run test
ornode_modules/.bin/jest
) yarn test
Steps to Reproduce
- create a workspace with multiple folders
- add a folder (folder-1) without any test, in package.json add a test script with
--passWithNoTests
,vscode-jest
will still consider jest failed. - add another folder (folder-2) without any test, in package.json, add a test script with
"test": echo "no test yet"
Relevant Debug Info
from folder-1 output channel:
Done in 0.93s.
Starting Jest in Watch mode failed too many times and has been stopped.
Consider add this workspace folder to disabledWorkspaceFolders
see troubleshooting: https://github.com/jest-community/vscode-jest/blob/master/README.md#troubleshooting
from folder-2 output channel:
yarn run v1.21.1
$ echo 'test not yet implemented' --testLocationInResults --json --useStderr --outputFile /var/folders/vg/yw9mltwd1mj_29xbvhwywc980000gn/T/jest_runner_core.json --watch --no-coverage --no-color --reporters default --reporters /Users/xxx/.vscode/extensions/orta.vscode-jest-3.1.0/out/reporter.js
test not yet implemented --testLocationInResults --json --useStderr --outputFile /var/folders/vg/yw9mltwd1mj_29xbvhwywc980000gn/T/jest_runner_core.json --watch --no-coverage --no-color --reporters default --reporters /Users/xxx/.vscode/extensions/orta.vscode-jest-3.1.0/out/reporter.js
Done in 0.06s.
Starting Jest in Watch mode failed too many times and has been stopped.
Consider add this workspace folder to disabledWorkspaceFolders
see troubleshooting: https://github.com/jest-community/vscode-jest/blob/master/README.md#troubleshooting
Expected Behavior
- folder-1 output channel has wiped out the actual command executed
- it should not report jest test failure
- if it must, at least show which folder is failed in the helper popup
- our troubleshooting section should be revamped to provide better self-help instructions…
Actual Behavior
right now all failures in a workspace env suggest users to “disableWorkspaceFolders”, which is not always helpful
The fastest (and the most fun) way to resolve the issue is to submit a pull-request yourself. If you are interested, feel free to check out the contribution guide, we look forward to seeing your PR…
Issue Analytics
- State:
- Created 4 years ago
- Reactions:17
- Comments:6
Top Results From Across the Web
Fix 'EMFILE: too many open files' error in Jest
When trying to run Jest in watch mode, this error may mean that you are missing a dependency.
Read more >Starting Jest in Watch mode error and missing Debug link ...
Error Starting Jest in Watch mode failed too many times and has been stopped. Things I tried: Using the Help link. This leads...
Read more >Configuring Jest
Configuring Jest. The Jest philosophy is to work great by default, but sometimes you just need more configuration power.
Read more >vscode-jest - Visual Studio Marketplace
How to trigger the test run? By default, the extension uses jest watch mode that automatically runs tests upon related file changes. In...
Read more >Frontend testing standards and style guidelines - GitLab Docs
Running yarn jest-debug runs Jest in debug mode, allowing you to debug/inspect as described in the Jest docs. ... If your test exceeds...
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
you could also, as a work around, modify
pathToJest
to source which version of node firstI had the same issue, and my problem ended up being that I was using nvm, so the plugin couldn’t find node.
My solution ended up being installing node using one of the recommended installers.