-
Notifications
You must be signed in to change notification settings - Fork 91
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
Enable ignoring line patterns #398
Comments
It kind of relates to that, on the possibility to ignore comments, by the way: #182 |
With regards to The above is true of comments as well, although it might be easier to come up with a heuristic for comments. I guess, ultimately my question is, if If it's mostly an aesthetic difference, I question whether it's worth adding to the complexity of c8 to address the problem. |
The problem with comments being 100% covered means that if I decide one day to comment my code, my code coverage will increase when it should not. |
This is fixed in Vitest v1.6 and v2: vitest-dev/vitest#5457. It's no longer |
I am transitioning from Jest to Vitest, which uses C8 to generate the coverage report.
I noticed a huge difference (x3 factor) in coverage between Jest and Vitest, explained by 3 things:
import
lines by default, Vitest (C8) doesn'tExample with Vitest (C8):
Example with Jest:
Since I suppose c8 wants to remain unopinionated, I suppose it would be best to give the option to the c8 user to choose if he wants to ignore
import
/require
lines or not, comments or not, and to count multiple line objects as one line or not.Is it possible to add an option to c8 to do that?
The text was updated successfully, but these errors were encountered: