karma-runner / karma-coverage

A Karma plugin. Generate code coverage.
MIT License
770 stars 247 forks source link

How to exclude models, enums, mock files from coverage report? #351

Open deepakmhr opened 6 years ago

deepakmhr commented 6 years ago

This is the karma configuration for predecessors I'm using but it's still exporting code converge for all files including models, enums and mock files.

preprocessors: {
    // source files, that you wanna generate coverage for 
    // do not include tests or libraries 
    // (these files will be instrumented by Istanbul) 
    '../src/**/!(*spec|*model|*enum|*mock).js': ['coverage']
},

Please help me If I've configured karma wrongly?

packruler commented 6 years ago

I would like to know how to do this as well... I can get them to be excluded from testing but not from what is exported from coverage reports