-
-
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
fix(jest-config): Allow exactly one project #7498
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Hmm, I'm not going to fix the broken test(s) until I know if this is necessary 😄 |
#5176 is for object config, not a string pointing to a directory containing config. An integration test in |
Yea, but this issue was marked closed as a result: #4117 |
Oh! Haha. That has to have been an error. Seeing as this issue has a better reproduction, we should keep this open I think |
And nobody noticed... XD |
I went through and commented in that issue I closed, and closed 2 duplicates, pointing to #7496. I'll hide shamefully in a corner 😅 |
I've added an e2e test which demonstrates the issue (breaks before the change from However, the change seems to affect other stuff. Based on the other integration test that now breaks, my guess is that the root project counts towards the Perhaps the root project should always be counted, even when Thoughts, anyone? 😄 |
There is some config that only applies to the root project ( |
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
This fixes the issue described in #7496, where Jest ignores the project's configuration if the config's
projects
array resolves to exactly one project.Fixes #7496
Test plan
I've tested that it works in my reproduction case, but I'm not sure how to write a test case for it, or why the test checked
> 1
in the first place.I'll be happy to write a test if someone nudges me in the right direction!