Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine the coverage reporters, add to updated reporter config #1136

Open
jason0x43 opened this issue Apr 14, 2020 · 1 comment
Open

Combine the coverage reporters, add to updated reporter config #1136

jason0x43 opened this issue Apr 14, 2020 · 1 comment
Labels
domain-reporters Related to Intern's built-in reporters effort-medium This may take a couple of days priority-medium This should get done, but it's not a high priority
Projects

Comments

@jason0x43
Copy link
Member

jason0x43 commented Apr 14, 2020

The coverage reporters are all just thin wrappers around Istanbul's coverage reporters. Rather than having a bunch of duplicative wrappers, have a single coverage reporter module that accepts options to determine what type of report is to be generated. If multiple types of coverage report are to be generated, multiple reporter instances can be created.

import createCoverageReporter from 'core/lib/reporters/coverage';

// ...

const htmlCov = createCoverageReporter(this, { type: 'html' });
const cobertura = createCoverageReporter(this, { type: 'cobertura' });

Built-in coverage reporters should be configured through a single top level output property:

{
  "output": {
      // use with default options,
    "htmlcoverage": true,

    // use with report-specific options
    "cobertura": {
      "projectRoot": "../../"
    }
  }
}

See discussion in #1023 (comment).

@jason0x43 jason0x43 added effort-medium This may take a couple of days domain-reporters Related to Intern's built-in reporters priority-medium This should get done, but it's not a high priority labels Apr 14, 2020
@github-actions github-actions bot added this to To do in Development Apr 14, 2020
@jason0x43
Copy link
Member Author

The config updates are related to #1109.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain-reporters Related to Intern's built-in reporters effort-medium This may take a couple of days priority-medium This should get done, but it's not a high priority
Projects
Development

No branches or pull requests

1 participant