benbria / coffee-coverage

Istanbul and JSCoverage-style instrumentation for CoffeeScript files.
MIT License
145 stars 31 forks source link

Any way to ignore some directory ? #86

Closed luochen1990 closed 7 years ago

luochen1990 commented 7 years ago

I want the code which is not in the src/ directory not to be counted in the coverage report, is there any way to do that?

jwalton commented 7 years ago

Yeah, for sure. If you register a custom loader, you can set the exclude option. Have a look at https://github.com/benbria/coffee-coverage/blob/master/docs/HOWTO-istanbul.md#writing-a-custom-loader. (It would be nice if there was an include, so you could say "only include /src", but right now there's only an exclude.)