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

Disable watch in npm test -- --coverage #1207

Closed
gaearon opened this issue Dec 8, 2016 · 4 comments
Closed

Disable watch in npm test -- --coverage #1207

gaearon opened this issue Dec 8, 2016 · 4 comments

Comments

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

See discussion in jestjs/jest#2256.
We need to decide how to handle this and fix it.

@gaearon gaearon added this to the 0.9.0 milestone Dec 8, 2016
@BenoitAverty
Copy link
Contributor

My opinion on this is that the coverage information is usually not needed at the same time as when the watch mode is most useful.

Most of the time, I use watch mode while writing tests or doing tdd, which allow me to go faster than if I had to run the tests all the time. In this case, I usually don't care about test coverage.

On the other hand, right before commiting, I find the coverage info very useful because it allows me to see if I forgot a test or if something I thought I tested is, in fact, not properly done. When I notice that, I often fix it without watch mode.

I don't know if there are a lot of people in my case, but for me the simplest and best option is to simply disable watch mode when the --coverage flag is specified

@gaearon
Copy link
Contributor Author

gaearon commented Dec 9, 2016

the simplest and best option is to simply disable watch mode when the --coverage flag is specified

Agree. 👍
Want to make a PR?

@BenoitAverty
Copy link
Contributor

Yeah I'll open on now. Thanks !

@gaearon
Copy link
Contributor Author

gaearon commented Dec 11, 2016

Should be fixed in react-scripts@0.8.4. Please verify.
https://github.com/facebookincubator/create-react-app/releases/tag/v0.8.4

@gaearon gaearon closed this as completed Dec 11, 2016
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants