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

Update types for FullJestConfig to be in sync with types in Jest #459

Merged
merged 2 commits into from
Mar 4, 2018
Merged

Update types for FullJestConfig to be in sync with types in Jest #459

merged 2 commits into from
Mar 4, 2018

Conversation

ahnpnl
Copy link
Collaborator

@ahnpnl ahnpnl commented Mar 4, 2018

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

@@ -39,6 +39,10 @@ export interface FullJestConfig {
cacheDirectory: Path;
clearMocks: boolean;
coveragePathIgnorePatterns: string[];
cwd: Path;
detectLeaks: boolean;
displayName: string;
Copy link
Owner

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

@@ -60,7 +60,7 @@ export interface FullJestConfig {
roots: Path[];
runner: string;
setupFiles: Path[];
setupTestFrameworkScriptFile: Path;
setupTestFrameworkScriptFile: Path | null;
Copy link
Owner

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;

Copy link
Collaborator Author

@ahnpnl ahnpnl Mar 4, 2018

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

Copy link
Owner

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants