karma-runner / karma-runner/karma-coverage

Allow the filename to be a function of the browser

Open
#365 0 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.