How to collect test coverage including untested files? #55447
Unanswered
DanilAgafonov
asked this question in
General
Replies: 2 comments
-
Also interested ! I think this is related to nodejs/help#4487 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Coverage is collected using v8's takeCoverage method, which means it is only aware of code that has actually run. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to include untested files in coverage report?
Reason: I want to know how much code I have uncovered in my project overall. I want to see files for which I haven't created any tests and never imported them anywhere.
Example:
Let's say I have
src/index.js
file. And I runnode --test --experimental-test-coverage --test-coverage-include="src/**/*"
in the root of my project. My expectation: report should includeindex.js
showing that zero lines covered with tests.Beta Was this translation helpful? Give feedback.
All reactions