The Wayback Machine - https://web.archive.org/web/20201021182554/https://github.com/facebook/jest/issues/10124
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

Warn when multiple configs are found #10124

Open
SimenB opened this issue Jun 4, 2020 · 4 comments
Open

Warn when multiple configs are found #10124

SimenB opened this issue Jun 4, 2020 · 4 comments

Comments

@SimenB
Copy link
Collaborator

@SimenB SimenB commented Jun 4, 2020

🚀 Feature Proposal

From #10123.

When we find a config file, we should also check if there is a jest entry in any sibling package.json and print a warning that it is ignored.

If using --config we should not warn.

Motivation

Helps the user have correct and consistent configuration and helps when trying to debug why config is not applied.

Example

$ jest
● Multiple configurations found:

  Jest will use `path/to/jest.config.js` for configuration, but Jest also
  found configuration in `path/to/package.json`. Delete the `"jest"` key
  in that file to silence this warning, or delete the `jest.config.js` file
  to use the configuration from `package.json`.

  Configuration Documentation:
  https://jestjs.io/docs/en/configuration.html
@Mansehej
Copy link

@Mansehej Mansehej commented Jun 4, 2020

Hey,
Mind if I give it a try as my first issue?

@thymikee
Copy link
Collaborator

@thymikee thymikee commented Jun 5, 2020

@Mansehej go for it!

@AndresContreras96
Copy link

@AndresContreras96 AndresContreras96 commented Jun 19, 2020

Hello @Mansehej are you keep working on this issue?

@Mansehej
Copy link

@Mansehej Mansehej commented Jun 19, 2020

Hey @AndresContreras96, I am indeed. I have, infact, got it working, I'm trying to figure out writing tests for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.