Jest: "Test run was interrupted." happens with npm run test
See original GitHub issueIs this a bug report?
Yes
Can you also reproduce the problem with npm 4.x?
Yes
Which terms did you search for in User Guide?
Environment
node -v
: 6.9.1npm -v
: 4.6.1npm ls react-scripts
(if you haven’t ejected): 1
Then, specify:
- Operating system: Windows 8.1
Steps to Reproduce
(Write your steps here:)
- npm run test
Expected Behavior
Unit tests would execute
Actual Behavior
Consistently get:
“Test run was interrupted.”
Reproducible Demo
Tough to come up with a case. I did notice that adding --runInBand seems to work fine (though slower).
I’m thinking this is due to my Anti Virus, and is likely an issue with Jest, however, since everyone here works with similar configurations, I figured I’d start here before posting over there.
Unfortunately, I can’t prove out my AV theory, as I need my IT team to allow me to stop it.
Issue Analytics
- State:
- Created 6 years ago
- Comments:25 (11 by maintainers)
Top Results From Across the Web
Watch and rerun Jest JS tests - npm - Stack Overflow
An important thing to point out is that nodemon will interrupt the tests and start again if a change happens while the tests...
Read more >Troubleshooting - Jest
Troubleshooting. Uh oh, something went wrong? Use this guide to resolve issues with Jest. Tests are Failing and You Don't Know Why.
Read more >jest - npm
Instant Feedback: Failed tests run first. Fast interactive mode can switch between running all tests or only test files related to changed ...
Read more >Jest Testing like a Pro - Tips and tricks
If the methods you want to test are asynchronous, be it callbacks, promises or async, it is not a problem with Jest. The...
Read more >How to fix broken Jest in React 16.4.1 with CRA and debug ...
Turns out it's something with the react-scripts portion of create-react-app being out of date on its version of the Jest Testing API. I...
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
Yeap, worth a try.
I’m not sure that I will be able to provide good track down of issue, though, since issue seems to be sporadic and happens only sometimes, and that “sometimes” usually starts to happen only after Jest works for a while and some good amount of watch events happens.
Looks like Cmder/ConEmu is triggering an [Enter] key somehow which is setting the ‘interrupted’ state in testWatcher to true.
(jest-cli/build/watch.js)
(jest-cli/build/constants.js)
(Using react-scripts 1.0.7)