-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test run of code running process.exit(1)
with workers hangs indefinitely
#6726
Comments
Found the same issue yesterday! https://github.com/cirias/hanging-jest |
@mjesun thoughts on this one? |
Covered by #6714 IMO. Easy enough for people to stub out |
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. |
🐛 Bug Report
Test run of several test files with workers (i.e., not in band) sometimes hangs indefinitely if the code under test calls
process#exit
.Demo note:
y
is an alias foryarn
, and the code is found at https://github.com/theneva/jest-process-exit.Here's the output with the diff from #6714 applied:
To Reproduce
Steps to reproduce the behavior:
process.exit(1)
process#exit
--runInBand
)A run of only the test file with the failing test always terminates immediately after
process#exit
is called, and the same applies when running multiple test files in band.Expected behavior
The test run should exit with an error message instead of continuing indefinitely.
Additionally, it would be great with feedback on why the test failed via something like @SimenB's PR #6714.
Link to repl or repo (highly encouraged)
https://github.com/theneva/jest-process-exit is the smallest I could manage.
Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: