-
-
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
[jest-each] Migrate to Typescript #8007
Conversation
c31ce47
to
0731192
Compare
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.
Woo, awesome!
My only comment really is that there's a lot of any
here that doesn't have to be. Could you look into narrowing the types? At least replace with unknown
as much as possible.
Also, please add jest-each
to https://github.com/facebook/jest/blob/1b2fffa9f13a67e54441606fda75822064cee57e/packages/jest-circus/tsconfig.json and remove the ts-ignore
in there
@@ -15,8 +14,8 @@ import {ErrorWithStack} from 'jest-util'; | |||
|
|||
type Table = Array<Array<any>>; | |||
type PrettyArgs = { | |||
args: Array<mixed>, | |||
title: string, | |||
args: Array<any>; |
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.
args: Array<any>; | |
args: Array<unknown>; |
if it doesn't cause huge issues 🙂
@@ -26,7 +25,7 @@ const PRETTY_PLACEHOLDER = '%p'; | |||
const INDEX_PLACEHOLDER = '%#'; | |||
|
|||
export default (cb: Function, supportsDone: boolean = true) => (...args: any) => |
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.
export default (cb: Function, supportsDone: boolean = true) => (...args: any) => | |
export default (cb: Function, supportsDone: boolean = true) => (...args: Array<unknown>) => |
or at least Array<any>
|
||
const install = (g: GlobalCallbacks, ...args: Array<mixed>) => { | ||
const test = (title: string, test: Function, timeout: number) => | ||
const install = (g: Global, ...args: Array<any>) => { |
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.
const install = (g: Global, ...args: Array<any>) => { | |
const install = (g: Global, ...args: Array<unknown>) => { |
Codecov Report
@@ Coverage Diff @@
## master #8007 +/- ##
==========================================
- Coverage 64.18% 64.18% -0.01%
==========================================
Files 259 259
Lines 10141 10143 +2
Branches 1753 1770 +17
==========================================
+ Hits 6509 6510 +1
Misses 3246 3246
- Partials 386 387 +1
Continue to review full report at Codecov.
|
60dea6b
to
fa68ab0
Compare
fa68ab0
to
b99365a
Compare
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
This PR moves
jest-each
to TS as part of #7807Test plan