-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
--coverage option is not compatible with --watch option #1284
Comments
Maybe we should have a short summary only (overall coverage) when using coverage and watch? |
wait... why would you use |
I have asked this question myself but people seem to want it. |
Hmm fair question. @DmitriiAbramov . Maybe we should document the fact that |
@tonyxiao i think if there is any valid use for it, we should make it work. But if not, i think it's better to just throw an error and kill the process. Wrong information is worse than no information :) |
@DmitriiAbramov agreed. I'd be totally happy if we throw error and kill the process. The problem was not knowing that they shouldn't be used together and expecting it to work. |
Ok, let's do this: instead of erroring, show a message on the top that says "coverage is enabled through the config but not active during |
That would work too. 👍 |
So if I have coverage enabled via my config, is there a way to disable it when trying to run watch in command line? |
Fixed in #1515 for Jest 15. |
Was @calclavia's question even answered? I'm curious about this as well.
|
You are right, |
Hi, I'm really interest in Is there any chance to implement this feature? If not can you explain me why? Do you have any solution to my problem? Thank you in advance |
See #5601 |
See #7331 |
Hi there and thanks for your awesome efforts for making jest a wonderful testing framework. This is sure if you practice TDD, you can run jest with coverage on a separate terminal (not using --watch), because with TDD you will have a very good coverage usually, but if this is not the case and you wrote a lot of code then the combination of --watch --coverage + using a plugin for the IDE can help. Also using --watch --coverage can increase the productivity instead of returning to the terminal and rerun the command line every time you do some tests. Thanks again for your efforts |
I finally got a working configuration. When the configuration is set in the
And in package.json:
|
Thanks @Abadii!
does the job. TDD FTW! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
when you use them together tests still run after each change but test failures are no longer visible.
After each test, the console clears to the following
You'd need to scroll up in the terminal buffer in order to view test failures, which makes
--watch
much harder to use.The text was updated successfully, but these errors were encountered: