How to collect test coverage including untested files? #4564
Unanswered
DanilAgafonov
asked this question in
Q&A
Replies: 5 comments 3 replies
-
|
Also interested ! I think this is related to #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
-
Beta Was this translation helpful? Give feedback.
2 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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.jsfile. And I runnode --test --experimental-test-coverage --test-coverage-include="src/**/*"in the root of my project. My expectation: report should includeindex.jsshowing that zero lines covered with tests.Beta Was this translation helpful? Give feedback.
All reactions