Skip to content

Commit

Permalink
fix: tap reporter doesn't throw (#1810)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Aug 6, 2022
1 parent 95c1d34 commit 33b5f83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/vitest/src/node/logger.ts
Expand Up @@ -108,7 +108,7 @@ export class Logger {
async printUnhandledErrors(errors: unknown[]) {
const errorMessage = c.red(c.bold(
`\nVitest caught ${errors.length} unhandled error${errors.length > 1 ? 's' : ''} during the test run. This might cause false positive tests.`
+ '\nPlease, resolve all the errors to make sure your tests are not affected.',
+ '\nPlease, resolve all errors to make sure your tests are not affected.',
))
this.log(c.red(divider(c.bold(c.inverse(' Unhandled Errors ')))))
this.log(errorMessage)
Expand Down
2 changes: 1 addition & 1 deletion packages/vitest/src/node/reporters/tap.ts
Expand Up @@ -20,7 +20,7 @@ export class TapReporter implements Reporter {

onInit(ctx: Vitest): void {
this.ctx = ctx
this.logger = new IndentedLogger(this.ctx.logger.log.bind(this.ctx))
this.logger = new IndentedLogger(ctx.logger.log.bind(ctx.logger))
}

static getComment(task: Task): string {
Expand Down

0 comments on commit 33b5f83

Please sign in to comment.