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

Allow testMatch for jest config #9114

Merged
merged 1 commit into from
Jun 6, 2020
Merged

Allow testMatch for jest config #9114

merged 1 commit into from
Jun 6, 2020

Conversation

favna
Copy link
Contributor

@favna favna commented Jun 5, 2020

Resolves #8637.

Tested locally with these steps:

  1. cd packages/react-scripts
  2. yarn link
  3. In another project: yarn link "react-scripts"
  4. Running SKIP_PREFLIGHT_CHECKS=true yarn test
  5. Verifying that nothing changed from before symlinking modules
    image
  6. Add testMatch key to package.json Jest config
  7. Running SKIP_PREFLIGHT_CHECKS=true yarn test again
  8. Verifying that only filed matching specified pattern are being included for testing
    image

For further reasoning as to why this option should be added please refer to #8637.

@facebook-github-bot
Copy link

Hi @favna!

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 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.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

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

@favna
Copy link
Contributor Author

favna commented Jun 5, 2020

Failing CI appears unrelated to this PR, as a matter of fact, at time of writing CI is also failing on master....

Copy link
Contributor

@mrmckeb mrmckeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no reason why this would affect the CI either, sorry you hit that issue.

@ianschmitz I think we can merge this one?

@ianschmitz
Copy link
Contributor

Bah this error in CI is getting old...

@ianschmitz ianschmitz changed the title feat(react-scripts): allow testMatch for jest config Allow testMatch for jest config Jun 6, 2020
@ianschmitz ianschmitz added this to the 4.0 milestone Jun 6, 2020
@ianschmitz ianschmitz merged commit 538d527 into facebook:master Jun 6, 2020
@favna favna deleted the feat/react-scripts/allow-testmatch branch June 6, 2020 15:34
victor-travelperk pushed a commit to travelperk/create-react-app that referenced this pull request Jun 8, 2020
@lock lock bot locked and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Jest option "testMatch"
4 participants