karma-runner / karma-runner/karma-coverage

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

Open
#351 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
771
Forks
242
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Research direction

Start with the Karma configuration's preprocessors pattern and the coverage plugin documentation to determine how source files are selected for instrumentation. Confirm the configuration excludes models, enums, mocks, and spec files from the exported coverage report.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.