How to collect test coverage including untested files? #4564
Replies: 5 comments 3 replies
-
|
Also interested ! I think this is related to #4487 |
Beta Was this translation helpful? Give feedback.
-
|
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.
-
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
Beta Was this translation helpful? Give feedback.
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