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

chore: Adding warn when have multiple configs #10798

Closed
wants to merge 3 commits into from
Closed

Conversation

mgm793
Copy link

@mgm793 mgm793 commented Nov 9, 2020

Summary

Test plan

Copy link
Member

@SimenB SimenB left a 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?

Comment on lines +114 to +115
'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' +
Copy link
Member

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();
Copy link
Member

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

@github-actions
Copy link

github-actions bot commented Nov 6, 2021

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants