Skip to content

Commit

Permalink
fix: throw provider initialization errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Apr 4, 2023
1 parent be1bf08 commit 08a0c2d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions packages/vitest/src/node/core.ts
Expand Up @@ -245,17 +245,11 @@ export class Vitest {
return
}

try {
await this.initCoverageProvider()
await this.coverageProvider?.clean(this.config.coverage.clean)
await this.initCoverageProvider()
await this.coverageProvider?.clean(this.config.coverage.clean)

if (this.isBrowserEnabled())
await this.initBrowserProvider()
}
catch (e) {
this.logger.error(e)
process.exit(1)
}
if (this.isBrowserEnabled())
await this.initBrowserProvider()

await this.report('onInit', this)

Expand Down

0 comments on commit 08a0c2d

Please sign in to comment.