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: which tests cover this function? #820

Closed acud closed 7 years ago

acud commented 7 years ago

Hi,

A kind confession is that I didn't dig into the istanbul sources yet to find out if this is feasible and what would be the complexity of implementation, but it would really be helpful if the code coverage could also display which tests (filenames) result in the specific function(s) being called - not just the number of times a function was called but also who called it.

A wild guess that the overhead of storing and displaying this information might be considerable in terms of size of artefacts so maybe it could be implemented as an explicit flag.

Cheers