You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was submitting a feature request for the vitest project, regarding that generating coverage reports when unit tests fail does not make a lot of sense.
It was noted that tools like c8 do generate reports on failure (vitest-dev/vitest#2908 (comment)) and I was wondering if there was a reason for this.
The text was updated successfully, but these errors were encountered:
I was searching whether any option exists to stop coverage from running if tests fail and I ran into this issue, so I'm co-opting it if you don't mind.
Sometimes coverage report is quite long and scrolling is necessary to know if any tests failed. Is there a way to configure c8 so that coverage does not run if a test did not pass? If not, could I feature-request it?
I'd also like to see built-in support for this, but it's not that hard to do yourself:
c8 --reporter none -- <test command> && c8 report
The initial run will not print a report, and will fail (as usual) if the test command fails. The second run will print the report, but doesn't run if the first fails.
I was submitting a feature request for the vitest project, regarding that generating coverage reports when unit tests fail does not make a lot of sense.
It was noted that tools like c8 do generate reports on failure (vitest-dev/vitest#2908 (comment)) and I was wondering if there was a reason for this.
The text was updated successfully, but these errors were encountered: