-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Support Jest's coverage options #2825
Comments
I don’t think you need to put I am also not sure why you need |
(To clarify, I’m not sure I understand the purpose of putting them in |
Thanks for the quick response. I know I could use I understand that most people may not want to enable coverage options in |
What happens if you add it as option to |
Both plain Jest and By the way it may be worth noting that I occasionally upload my Jest coverage results to cloud services (like Coveralls). As a result I like having coverage enabled in all environments (for projects where it isn't too slow) so I can preview my coverage locally. |
Whoops, I just double checked and |
It’s intentional because enabling coverage together with watcher produces a very weird output. After changing files, you’ll see 0% reported for everything that test re-run hasn’t touched. |
Ah, I think I noticed that once but I didn't realize the cause. I think it's fair to discourage that but I still found it surprising that |
Sure, it would be nice if Jest showed something more meaningful or ignored coverage altogether in watch mode. I'll close this issue but feel free to reach out to Jest. |
I was surprised when I got a warning from
npm test
stating that Jest's coverage options aren't supported. As a prior Jest user I expected them to be supported since Jest's--coverage
option works fine.While I know I could just change my
test
script or eject, I think it would reduce confusion to support this out of the box. Is seems like there's a whitelist for options, how easy would it be to implement support for all thecoverage*
options?Output
The text was updated successfully, but these errors were encountered: