-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Update testMatch to also be compatible with Jest 24 #6313
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 cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Hi @ngbrown, thanks for that. I think this change should be accompanied by a move to Jest 24... but I agree it's necessary for that. Let's hold off until that time, if that's OK? |
I submitted this separate because Jest 24 isn't quite ready (jestjs/jest#7707) to be pulled into Being able to merge now is why I made sure the new pattern would work equivalently in the older |
If jest 24 is blocked until a new major, it'd be a good idea to land this in the meantime |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
I'm not sure this is still needed as we've landed Jest 24 and from my quick tests it seems to be working okay. @SimenB can you advise? Should we make this change? |
If you've tested on windows and it works, this shouldn't be needed |
I tested CRA version 3.0.0-next.b0cbf2ca on windows, and it is not detecting any tests. |
For people who try to use Jest 24, there is a different version of
micromatch
and it behaves differently. These changes should make it behave the same before and after changing Jest versions.Without this change, Jest 24 will come up with no files to test.
I tested with
npm run test -- --listTests
on two projects, one with the default Jest 23 and another with the new Jest 24. In addition to numerous normally named test files had some special case files likesrc/.test.js
,src/test.js
, andsrc/somethingtest.js
. Only the first two matched and the third one didn't; both pre-, and post- this change.