-
-
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
[Bug]: In Node 20, Jest exits with non-zero exit code if process.exitCode
is set in the tested code
#14501
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
I've tried with the latest release of Jest (v29.7.0) and Node.js 20 (v20.8.0) and the behavior has not changed. |
Happy to take a PR which makes sure to ignore any jest/packages/jest-runner/src/runTest.ts Lines 263 to 281 in 00ef0ed
|
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
1 similar comment
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
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. |
Version
29.6.4
Steps to reproduce
Expected behavior
This is the code in the reproduction. I expect that the test will pass and Jest will exit with status code
0
since all the tests passed.Actual behavior
In Node.js 18, Jest exits with code
0
and the output is:In Node.js 20, Jest exits with code
1
and the output is:Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: