-
-
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
Jest should process.exit(0|1)
after tests finish running
#3050
Comments
That's what |
The answer did not solve the issue... |
@cpojer - could you shed some light on why this is considered an escape hatch, and not default behaviour? My expectation would be that invoking Jest is for the sole purpose of running tests. Once all test blocks have resolved one way or another, and each IMO, these should be killed by default. We have after* for neat clean-up/shutdown if needed, but I'd bet the majority of the time a hard exit wouldn't present any issues. |
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. |
Do you want to request a feature or report a bug?
feature/bug
What is the current behavior?
If a library misbehaves and doesn't let the process exit, then the process hangs indefinitely, though all tests pass. It could be argued that these libraries may not even be misbehaving as there are some valid reasons to not let the process end naturally.
If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can
yarn install
andyarn test
.What is the expected behavior?
Jest exits the process when all tests are completed and there's nothing more for Jest to test.
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
I don't think it is relevant, but here:
The text was updated successfully, but these errors were encountered: