-
-
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
Move from "process.exit" to "exit" #5313
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5313 +/- ##
==========================================
+ Coverage 61.24% 61.27% +0.03%
==========================================
Files 205 205
Lines 6892 6893 +1
Branches 3 4 +1
==========================================
+ Hits 4221 4224 +3
+ Misses 2670 2668 -2
Partials 1 1
Continue to review full report at Codecov.
|
Is it possible to test this somehow? |
Tests already do test that (to some extent). Some of them spy or mock |
This is a follow-up to jestjs#5313
This is a follow-up to jestjs#5313
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Changing all
process.exit
toexit
. This prevents sudden truncation of Jest output when finishing test execution, if the output information is too big (I've seen issues when the JSON output is above 256 KiB). As per the Node docs,process.exit()
will not wait up until all buffers are flushed, and will try to quit as soon as possible.Tests are still passing since
exit
usesprocess.exit
underneath.