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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Throw when multiple configs are found #12506

Closed
mrazauskas opened this issue Feb 27, 2022 · 9 comments 路 Fixed by #12510
Closed

[Feature]: Throw when multiple configs are found #12506

mrazauskas opened this issue Feb 27, 2022 · 9 comments 路 Fixed by #12510

Comments

@mrazauskas
Copy link
Contributor

馃殌 Feature Proposal

#11922 implemented a warning which is printed when multiple configs are found. It was decided to add this feature as a warning, because throwing an error would be a breaking change.

Seems like now it is good time to refactor the warning into an error.

@jankaifer Would you be interested? Perhaps?

Motivation

Running Jest after several configs were detected is rather indeterministic. Failing early with informative message makes Jest better.

Example

No response

Pitch

It is already in the core (;

@jankaifer
Copy link
Contributor

I could, but this seems like a great first-issue (even easier than the original one).
So I will gladly leave it to others.

@SimenB
Copy link
Member

SimenB commented Feb 27, 2022

Yeah, good idea!

@TrickyPi
Copy link
Contributor

I would like to work on this issue, can i take it?

@SimenB
Copy link
Member

SimenB commented Feb 27, 2022

Yeah, go for it @TrickyPi! You can see what #11922 changed, and what you essentially want to do now is throw an error instead of just logging it 馃檪

@TrickyPi
Copy link
Contributor

ok, i get it, thanks!

@mrazauskas
Copy link
Contributor Author

@TrickyPi And please do fix this tiny todo (the line was introduced with the above mentioned PR, Node 10 is not supported anymore so time to fix):

https://github.com/facebook/jest/blob/c2872aae7e3bdc8f9c236637ade294790a47d7f6/packages/jest-config/src/__tests__/resolveConfigPath.test.ts#L149-L150

@TrickyPi
Copy link
Contributor

okay

@SimenB
Copy link
Member

SimenB commented Mar 1, 2022

https://github.com/facebook/jest/releases/tag/v28.0.0-alpha.6

@github-actions
Copy link

github-actions bot commented Apr 1, 2022

This issue 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 Apr 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants