diff --git a/packages/vitest/src/node/reporters/base.ts b/packages/vitest/src/node/reporters/base.ts index a9df54547e11..9892fa86e73d 100644 --- a/packages/vitest/src/node/reporters/base.ts +++ b/packages/vitest/src/node/reporters/base.ts @@ -151,12 +151,12 @@ export abstract class BaseReporter implements Reporter { for (const test of tests) { const duration = test.result?.duration if (test.result?.state === 'fail') { - logger.log(c.red(` ${taskFail} ${getTestName(test, c.dim(' > '))}`)) const suffix = this.getDurationPrefix(test) + logger.log(c.red(` ${taskFail} ${getTestName(test, c.dim(' > '))}${suffix}`)) test.result?.errors?.forEach((e) => { // print short errors, full errors will be at the end in summary - logger.log(c.red(` ${F_RIGHT} ${(e as any)?.message}${suffix}`)) + logger.log(c.red(` ${F_RIGHT} ${(e as any)?.message}`)) }) } // also print slow tests diff --git a/test/reporters/tests/merge-reports.test.ts b/test/reporters/tests/merge-reports.test.ts index b66ccd7c7c9d..1ca7cc3cadf2 100644 --- a/test/reporters/tests/merge-reports.test.ts +++ b/test/reporters/tests/merge-reports.test.ts @@ -89,13 +89,13 @@ test('merge reports', async () => { test 1-2 ❯ first.test.ts (2 tests | 1 failed)