web icon indicating copy to clipboard operation
web copied to clipboard

Request: Add ability to native instrumentation to report coverage for unused files

Open LeoLeal opened this issue 3 years ago • 2 comments

Problem: Today, we are unable to get untested files as 0% coverage, because native instrumentation only shows coverage for tested files.

Suggestion: c8 (native v8 coverage reporter) has the ability to add unused files in the coverage report for true code coverage. It makes c8 scan all files recursively from the current directory that matches the patterns in the "include" option, making untested files reported as 0% coverage. This is the --all flag.

It would be nice to be able to pass this as a boolean in the coverageConfig object to turn this --all flag on for c8 (native instrumentation).

LeoLeal avatar Feb 07 '22 17:02 LeoLeal

+1 This would indeed be very useful in order to get an accurate code coverage report.

jmcgavin avatar Feb 21 '22 16:02 jmcgavin

+1. It's just much more accurate to have an idea of how much your whole project is being covered by tests.

glaubernespoli avatar Aug 10 '23 10:08 glaubernespoli