- Version: v16.13.1
- Platform: Darwin MacbookPro.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
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:
- Jest ignores
import lines by default, Vitest (C8) doesn't
- Jest ignores all comments by default, Vitest doesn't
- Multiple lines object are considered as one line by Jest, and are considered as many lines as there is by Vitest
Example 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?
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:
importlines 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/requirelines 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?