Skip to content

Commit

Permalink
feat: append cobertura to support diff line coverage (#227)
Browse files Browse the repository at this point in the history
Co-authored-by: zhixiang.tzx <zhixiang.tzx@alibaba-inc.com>
  • Loading branch information
Solais and zhixiang.tzx committed Apr 18, 2023
1 parent 1ac1d4c commit ddf732f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cmd/cov.ts
Expand Up @@ -26,7 +26,7 @@ export class CovCommand extends TestCommand {

@Option({
description: 'c8 instruments passthrough`',
default: '--temp-directory node_modules/.c8_output -r text-summary -r json-summary -r json -r lcov',
default: '--temp-directory node_modules/.c8_output -r text-summary -r json-summary -r json -r lcov -r cobertura',
})
c8: string;

Expand All @@ -51,6 +51,10 @@ export class CovCommand extends TestCommand {
if (this.prerequire) {
this.ctx.env.EGG_BIN_PREREQUIRE = 'true';
}
// append cobertura
if (this.c8) {
this.c8 += ' -r cobertura';
}

// add c8 args
// https://github.com/eggjs/egg/issues/3930
Expand Down

0 comments on commit ddf732f

Please sign in to comment.