diff --git a/src/cmd/cov.ts b/src/cmd/cov.ts index ff6622d5..ccdf023d 100644 --- a/src/cmd/cov.ts +++ b/src/cmd/cov.ts @@ -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; @@ -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