gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 786 forks source link

Feature request: Ignore imported file #914

Open st-schneider opened 5 years ago

st-schneider commented 5 years ago

It would be nice if import statements could be ignored as well so that the coverage is actually only taken from the file I want to test and not parts I may or may not mock.

sammysium commented 3 years ago

It would be nice if import statements could be ignored as well so that the coverage is actually only taken from the file I want to test and not parts I may or may not mock.

@bm-stschneider did you ever find a solution?

st-schneider commented 3 years ago

Sorry I did not.

jcollum-nutrien commented 1 year ago

I don't think imported files are used for coverage unless they also are your source files.