-
-
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: Adding warn when have multiple configs #10798
Conversation
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.
Sorry about the slow response! Have had very little time for open source the last few months...
I think we should throw instead of warning. Next release is a major, so that should be fine.
Thoughts?
'Jest will use `path/to/jest.config.js` for configuration, but Jest also\n' + | ||
'found configuration in `path/to/package.json`. Delete the `"jest"` key\n' + |
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.
these should point to the actual files instead of a generic path/to/jest.config.js
@@ -24,6 +24,8 @@ describe.each(JEST_CONFIG_EXT_ORDER.slice(0))( | |||
test(`file path with "${extension}"`, () => { | |||
const relativeConfigPath = `a/b/c/my_config${extension}`; | |||
const absoluteConfigPath = path.resolve(DIR, relativeConfigPath); | |||
const warn = console.warn; | |||
console.warn = jest.fn(); |
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.
you can use jest.spyOn
instead of assigning
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
Test plan