Skip to content
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

Merged
merged 3 commits into from
Mar 8, 2019

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Mar 8, 2019

Summary

A null check was added in #8045 (comment). However, it most certainly can be null, and the type definition for WorkerInterface was wrong. jest-runner even guards against it: https://github.com/facebook/jest/blob/1fd565168dbf5b49780df959a214148eb35d32db/packages/jest-runner/src/index.ts#L113-L114

Fixes #8078

Test plan

Not really a testable change since the unit tests mock out child_process.fork. However, the type is now corrected.

Copy link
Collaborator

@thymikee thymikee left a 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

@SimenB
Copy link
Member Author

SimenB commented Mar 8, 2019

There's one more "stdout is null" but in that case it really shouldn't be null

Right, I left it alone on purpose

@codecov-io
Copy link

Codecov Report

Merging #8083 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
...ages/jest-worker/src/workers/ChildProcessWorker.ts 85.71% <ø> (+6.46%) ⬆️
...kages/jest-worker/src/workers/NodeThreadsWorker.ts 87.23% <ø> (ø) ⬆️
packages/jest-worker/src/types.ts 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1fd5651...3f398cd. Read the comment docs.

@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jest related error when running gridsome develop
4 participants