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

Update testMatch to also be compatible with Jest 24 #6313

Merged
merged 2 commits into from Apr 16, 2019

Conversation

@ngbrown
Copy link
Contributor

commented Jan 31, 2019

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 like src/.test.js, src/test.js, and src/somethingtest.js. Only the first two matched and the third one didn't; both pre-, and post- this change.

@facebook-github-bot

This comment has been minimized.

Copy link

commented Jan 31, 2019

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!

@facebook-github-bot

This comment has been minimized.

Copy link

commented Jan 31, 2019

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@mrmckeb

This comment has been minimized.

Copy link
Collaborator

commented Feb 1, 2019

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?

@mrmckeb mrmckeb self-assigned this Feb 1, 2019

@ngbrown

This comment has been minimized.

Copy link
Contributor Author

commented Feb 1, 2019

I submitted this separate because Jest 24 isn't quite ready (facebook/jest#7707) to be pulled into create-react-app. Because Jest 24 has better support for TypeScript people might want to try it out. Since this is one of the first things they will run into, it might as well be fixed for everyone.

Being able to merge now is why I made sure the new pattern would work equivalently in the older micromatch.

@SimenB

This comment has been minimized.

Copy link
Contributor

commented Feb 14, 2019

If jest 24 is blocked until a new major, it'd be a good idea to land this in the meantime

@stale

This comment has been minimized.

Copy link

commented Mar 16, 2019

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.

@stale stale bot added the stale label Mar 16, 2019

@ianschmitz

This comment has been minimized.

Copy link
Collaborator

commented Mar 16, 2019

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?

@stale stale bot removed the stale label Mar 16, 2019

@SimenB

This comment has been minimized.

Copy link
Contributor

commented Mar 16, 2019

If you've tested on windows and it works, this shouldn't be needed

@ianschmitz ianschmitz added this to In progress in v3 via automation Mar 16, 2019

@ianschmitz ianschmitz added this to the 3.0 milestone Mar 16, 2019

@dalcib

This comment has been minimized.

Copy link
Contributor

commented Mar 17, 2019

I tested CRA version 3.0.0-next.b0cbf2ca on windows, and it is not detecting any tests.
This PR solves the problem.

@amyrlam amyrlam force-pushed the facebook:master branch from cecd762 to d3b19f9 Mar 24, 2019

@iansu iansu closed this Apr 4, 2019

v3 automation moved this from In progress to Done Apr 4, 2019

@iansu iansu reopened this Apr 4, 2019

v3 automation moved this from Done to In progress Apr 4, 2019

@ianschmitz ianschmitz requested review from petetnt and Timer as code owners Apr 16, 2019

@ianschmitz ianschmitz merged commit 207d931 into facebook:master Apr 16, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
netlify/create-react-app/deploy-preview Docs deploy preview succeeded
Details

v3 automation moved this from In progress to Done Apr 16, 2019

@lock lock bot locked and limited conversation to collaborators Apr 21, 2019

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