karma-runner / karma-runner/karma-coverage
Allow the filename to be a function of the browser
- Dominant language
- JavaScript
- Stars
- 771
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
Currently, only the `subdir` field can be a function of the browser name. This is convenient when you're generating a `html` report, which produces many files. However, some of the other reporters only produce a single file - including, notably, the `json` reporter, which can feed into `nyc merge` and `nyc report` to generate combined coverage reports across multiple test suites.
As `nyc merge` and `nyc report` don't look into subdirectories, if you use `karma` with multiple browsers, before running those commands you have to move the JSON reports from the browser-specific subdirectory into a common directory. This is not world-ending, but it's an annoyance that could be avoided if `file` could be a function of the browser like `subdir` can.
Contributor guide
Research direction
Start by locating the reporter configuration that handles the `file` and `subdir` fields, then trace how the browser name is passed to `subdir`. Check the JSON reporter path used before `nyc merge` and `nyc report`; done means `file` can derive a browser-specific filename while existing reporters continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100