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 787 forks source link

Code blocks not being ignore in coverage #888

Open TheoSl93 opened 6 years ago

TheoSl93 commented 6 years ago

Hi!

Is there a way to ignore blocks of code in the coverage without using a /* istanbul ignore next */ per line?

In my case I want to ignore the coverage of a large number of const definitions, and the only way I've found is by putting an /* istanbul ignore next */ in each line. How can I avoid that usign something like:

/* istanbul ignore block */ const ... const ... const ... /* istanbul ignore block */

Thanks!!!