-
Notifications
You must be signed in to change notification settings - Fork 450
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 types for FullJestConfig to be in sync with types in Jest #459
Conversation
src/jest-types.ts
Outdated
@@ -39,6 +39,10 @@ export interface FullJestConfig { | |||
cacheDirectory: Path; | |||
clearMocks: boolean; | |||
coveragePathIgnorePatterns: string[]; | |||
cwd: Path; | |||
detectLeaks: boolean; | |||
displayName: 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.
this should be string | null
src/jest-types.ts
Outdated
@@ -60,7 +60,7 @@ export interface FullJestConfig { | |||
roots: Path[]; | |||
runner: string; | |||
setupFiles: Path[]; | |||
setupTestFrameworkScriptFile: Path; | |||
setupTestFrameworkScriptFile: Path | null; |
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.
This should originally have been setupTestFrameworkScriptFile?: Path;
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.
haha indeed it looks a bit confused to me when checking their types. If you look at their ProjectConfig
type, it is ?Path but InitialOptions
is setupTestFrameworkScriptFile?. I think we can just follow the ProjectConfig
one to update similar to that
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.
oh right .. I guess I saw the other one. I think this should be fine :)
I recognize we have some missing types in FullJestConfig. This PR is to keep it in sync with types definition in Jest at https://github.com/facebook/jest/blob/master/types/Config.js