Jest/watchman stalls on "Determining test suites to run..."
See original GitHub issuebug
Running jest lasts about 5-10 minutes before the test completes, leaving the message:
“Determining test suites to run…”
The issue started occurring after I followed the directions from a warning (note: computer username replaced with USERNAME):
watchman warning:
To clear this warning, run:
`watchman watch-del /Users/USERNAME ; watchman watch-project /Users/USERNAME`
If you run the previous script, Jest calls “watchman” which then appears to do the intensive task of searching for all files located under my username.
I would suggest suppressing the “watchman” warning to avoid giving poor advice to other users.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Resolving “Determining Tests Suites to Run” Error in Jest Watch
The resolver will hang indefinitely instead of failing, so no clear error will be provided about where exactly it's choking.
Read more >node.js - jest hangs indefinitely, runs no tests - Stack Overflow
I had a similar issue. Most of my test where running but one suite was continuously running and never erroring.
Read more >Troubleshooting - Jest
Use this guide to resolve issues with Jest. Tests are Failing and You Don't Know Why. Try using the debugging support built into...
Read more >Why Jest freezes after tests run? (Jest hangs indefinitely)
Use this in cases where you need to use --forceExit in order for Jest to exit to potentially track down the reason. This...
Read more >Your Jest Tests are Leaking Memory
For many test suites this isn't a problem because even if tests leak memory, the tests don't use enough memory to actually cause...
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 Free
Top 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
Is
/Users/USERNAMEunder version control? I’m assuming that you have a.gitdir there. Watchman will try to watch at reasonable-looking project roots and if you home dir looks like one then it will use that as the location to watch.You can avoid this in a couple of ways:
/etc/watchman.jsonfile to set https://facebook.github.io/watchman/docs/config.html#root_files and https://facebook.github.io/watchman/docs/config.html#enforce_root_files to only allow watching projects that have a.watchmanconfigconfiguration file. This is what we use inside FB.I’ve been thinking about adding an restriction against watching home directories in a future release, but haven’t had the bandwidth to do this.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.