-
-
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
chore: use types from @jest/reporter in @jest/core #8045
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,10 +158,20 @@ export default class ChildProcessWorker implements WorkerInterface { | |
} | ||
|
||
getStdout(): NodeJS.ReadableStream { | ||
if (this._child.stdout === null) { | ||
throw new Error( | ||
'stdout is null - this should never happen. Please open up an issue at https://github.com/facebook/jest', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when actually this can happen? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have no idea. It's from DefinitelyTyped/DefinitelyTyped#33127 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. felt better to add an explicit error rather than ignoring the type error |
||
); | ||
} | ||
return this._child.stdout; | ||
} | ||
|
||
getStderr(): NodeJS.ReadableStream { | ||
if (this._child.stderr === null) { | ||
throw new Error( | ||
'stderr is null - this should never happen. Please open up an issue at https://github.com/facebook/jest', | ||
); | ||
} | ||
return this._child.stderr; | ||
} | ||
} |
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.
should have done this when I merged #7994 yesterday 😅 The typings disagreed as well, interestingly enough (which is why it raised an error now)