-
-
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
fix: jest-worker can return null
for getStdout()
#8083
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! There's one more "stdout is null" but in that case it really shouldn't be null, unless Node introduces a regression :P
Right, I left it alone on purpose |
Codecov Report
@@ Coverage Diff @@
## master #8083 +/- ##
==========================================
+ Coverage 62.33% 62.36% +0.02%
==========================================
Files 263 263
Lines 10334 10330 -4
Branches 2500 2497 -3
==========================================
Hits 6442 6442
+ Misses 3316 3314 -2
+ Partials 576 574 -2
Continue to review full report at Codecov.
|
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. |
Summary
A
null
check was added in #8045 (comment). However, it most certainly can benull
, and the type definition forWorkerInterface
was wrong.jest-runner
even guards against it: https://github.com/facebook/jest/blob/1fd565168dbf5b49780df959a214148eb35d32db/packages/jest-runner/src/index.ts#L113-L114Fixes #8078
Test plan
Not really a testable change since the unit tests mock out
child_process.fork
. However, the type is now corrected.