Skip to content
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

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

Open
LeoLeal opened this issue Feb 7, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@LeoLeal
Copy link

LeoLeal commented Feb 7, 2022

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).

@jmcgavin
Copy link

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

@glaubernespoli
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants