-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Update new-platform dependencies. #13338
Update new-platform dependencies. #13338
Conversation
export function captureTerminal<T extends string[]>( | ||
fn: (argv: T) => any, | ||
argv: T | ||
) { | ||
const _exit = process.exit; | ||
const _emit = process.emit; | ||
let mockProcessExit = jest.spyOn(global.process, 'exit') |
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.
Well, I wouldn't touch this file at all but the problem is that in node 8 typings process.exit
has never
return type that is incompatible with void
so it's hard to simulate in tests (it should never return). spyOn
was an easy solution :)
@@ -1,7 +1,7 @@ | |||
import { pick } from '../../../lib/utils'; | |||
|
|||
export interface Headers { | |||
[key: string]: string; | |||
[key: string]: string | string[]; |
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.
Corresponds to new node 8 typings.
@@ -23,8 +23,8 @@ | |||
"html" | |||
], | |||
"globals": { | |||
"__TS_CONFIG__": { |
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.
__TS_CONFIG__
is deprecated https://github.com/kulshekhar/ts-jest#tsconfig
955e394
to
080d5f4
Compare
080d5f4
to
0d2ed49
Compare
Okay, there is no any movement in the node issue mentioned above, so I'll merge this PR and keep tracking that issue for any updates. |
Most of the changes in the source code are caused by node 8 typings.
I won't merge this PR until it's clear what to do with
defaultEncoding
, see bug I filed nodejs/node#14611. Same thing is related to node 6, i.e. master branch./cc @kjbekkelund