alex-seville / blanket

blanket.js is a simple code coverage library for javascript. Designed to be easy to install and use, for both browser and nodejs.
http://blanketjs.org
Other
1.41k stars 177 forks source link

Is it possible to exclude part of code from coverage report? #442

Open mocheng opened 10 years ago

mocheng commented 10 years ago

Sometimes, it would be good to exempt part of code from coverage report with comments.

Like:

// blanket: disable

Code to be exempted

// blanket: enable

Kosta-Github commented 10 years ago

+1 for that feature request

alvinteh commented 9 years ago

I have partially figured how to implement this on my end - already have a working QUnit build, but need help in finding how to pass attachComment: true option to esprima.

Anyone knows how I can do so from within the blanket source? Once that's done I can submit a PR.

alvinteh commented 9 years ago

Figured it out. See alex-seville/blanket#460. The same changes can be applied to master (the development branch seems messy at the moment..).