Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tap reporter doesn't throw #1810

Merged
merged 1 commit into from Aug 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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