c8 icon indicating copy to clipboard operation
c8 copied to clipboard

export is instrumented with 0 coverage incase of zero test project

Open skullpsg opened this issue 1 year ago • 1 comments

I am trying to generate coverage for my project with zero test. I am getting instrumentation information with zero on export as well as empty line.

Issue is I am having a file with on only single export statement and comments. I am getting 0/6, for that. I want to get 6/6 for this case. Is it possible?

Thanks in advance.

skullpsg avatar May 09 '24 05:05 skullpsg

You should actually have 0/0, and the file being considered as empty by c8. Unfortunately, this is not how the tool works:

https://github.com/bcoe/c8/issues/500 https://github.com/bcoe/c8/issues/494

Would you like to give https://www.npmjs.com/package/one-double-zero a try?

ericmorand avatar Jul 21 '24 14:07 ericmorand