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

Use Jest projects for testing #5502

Closed
wants to merge 1 commit into from

Conversation

rogeliog
Copy link

@rogeliog rogeliog commented Sep 8, 2017

This change uses jest--projects to handle multiple projects
http://facebook.github.io/jest/docs/en/cli.html#projects-project1-projectn-

screen shot 2017-09-07 at 11 24 24 pm

@@ -21,8 +21,7 @@
"watch": "babel ./modules -d . --ignore __tests__ --watch",
"prepublishOnly": "node ./tools/build.js",
"clean": "git clean -fdX .",
"lint": "eslint modules",
"test": "jest"
Copy link
Member

Choose a reason for hiding this comment

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

Should we get rid of the test scripts in the individual packages? What if I want to watch on only one package?

Copy link
Author

Choose a reason for hiding this comment

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

That is a good point. I don't know the full context of the project, so if this proposal does not align with the overall direction of the project, I totally understand 😄

There are a couple of options

  • Jest allows to filter using a regex jest --watch react-router-dom
  • You can call Jest with only that project jest --projects packages/react-router-dom

@mjackson
Copy link
Member

Thanks for the PR, @rogeliog, and sorry it took me so long to get around to reviewing it. I didn't even know about the --projects Jest config, so thanks for bringing it to my attention. I think I'd prefer to have individual testing scripts for now, but will definitely keep projects in mind should that change in the future. 😅

@mjackson mjackson closed this Oct 15, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Dec 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants