Skip to content

Commit

Permalink
fix: clean coverage in watch-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Feb 3, 2023
1 parent 1e6cae4 commit 13cb111
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/coverage-c8/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export class C8CoverageProvider implements CoverageProvider {
async clean(clean = true) {
if (clean && existsSync(this.options.reportsDirectory))
await fs.rm(this.options.reportsDirectory, { recursive: true, force: true, maxRetries: 10 })

this.coverages = []
}

onAfterSuiteRun({ coverage }: AfterSuiteRunMeta) {
Expand Down

0 comments on commit 13cb111

Please sign in to comment.