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 authored 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
Original file line number Diff line number Diff line change
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.