karma-runner / karma-runner/karma-coverage
coverage only generated for the last browser (when having multiple browsers)
- Dominant language
- JavaScript
- Stars
- 771
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
Assuming you have the following configuration:
``` javascript
coverageReporter: {
dir: "build/coverage/",
reporters: [{
type: "html",
subdir: "report-html"
}, {
type: "lcov",
subdir: "report-lcov"
}, {
type: "text"
}]
}
```
and you are having multiple browsers configured. Then what you get is a folder `build/coverage/report-html/` with e.g.

So you are only able to view the coverage for the last runned browser. However, when removing the `subdir` property from the above snippet, a folder structure like the following will be generated under `build/coverage/`, to view coverage for all browsers.

Unfortunately I can't live without using `subdir` as this means that all reports will be written to the same directory.
@dignifiedquire is this a known behavior?
Contributor guide
Research direction
Reproduce the reported configuration with multiple browsers and the HTML, lcov, and text coverage reporters, comparing runs with and without subdir. Done means coverage output remains available for every browser while preserving separate report directories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100