-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
fix: Allow searching for tests in node_modules
#11084
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
Conversation
|
Hi @cjr125! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign 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 to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
76b1fc1 to
9e5be59
Compare
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
9e5be59 to
68e6841
Compare
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
ec15331 to
26efe98
Compare
SimenB
left a comment
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.
@cjr125 Hi, sorry I missed this PR!
Could you rebase it (or just merge in main if you prefer) and add an integration test actually running a test in node_modules? You can add a "fake" node_modules and just git add --force it
763c204 to
ed832d3
Compare
|
Thanks! Test is failing on CI, in case you missed it 🙂 |
504f99d to
213ce11
Compare
213ce11 to
a23b663
Compare
a23b663 to
0d1c05e
Compare
SimenB
left a comment
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.
thanks!
node_modules
|
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
In order to be able to inherit a common Jest test from an npm module, the user needs to be able to search for tests in the node_modules directory. The boolean "retainAllFiles" had been hard-coded to false, preventing this inheritance from being possible. The changes here expose the variable via the "haste" configuration property and allow the user to optionally scan the node_modules for test patterns.
Test plan