Repository navigation
Closed
Bug
Copy link
Labels
feat: reportersIssues and PRs related to Vitest reportersp3-minor-bugAn edge case that only affects very specific usage (priority)
Description
Describe the bug
When running a set of benchmarks within a describe suite locally, the name of the describe wrapper is displayed and it's children tests/benches are nested underneath.
pnpm bench (vitest bench):
DEV v5.0.0-beta.5 /home/projects/vitest-dev-vitest-uqh8x6va
✓ bench test/suite.bench.ts (2 tests) 13987ms
✓ my first suite (1)
✓ foo 7077ms
name hz min max mean p75 p99 p995 p999 rme samples
foo 8,463,339.28 0.0000 0.1000 0.0001 0.0000 0.0000 0.0200 0.0200 ±0.87% 8513010
✓ my second suite (1)
✓ foo 6909ms
name hz min max mean p75 p99 p995 p999 rme samples
foo 8,108,050.32 0.0000 16.0000 0.0001 0.0000 0.0000 0.0200 0.0200 ±3.25% 8156919
Test Files 1 passed (1)
Tests 2 passed (2)
Start at 14:44:27
Duration 14.69s (transform 23ms, setup 0ms, import 287ms, tests 13.99s, environment 0ms)
In a CI environment, the describe suite labels are not displayed and the test entries within are not printed properly nested:
CI=1 pnpm bench (CI=1 vitest bench):
RUN v5.0.0-beta.5 /home/projects/vitest-dev-vitest-uqh8x6va
✓ bench test/suite.bench.ts (2 tests) 13611ms
✓ foo 6780ms
name hz min max mean p75 p99 p995 p999 rme samples
foo 7,929,174.85 0.0000 58.6800 0.0001 0.0000 0.0000 0.0200 0.0200 ±11.53% 7975870
✓ foo 6829ms
name hz min max mean p75 p99 p995 p999 rme samples
foo 8,164,350.20 0.0000 0.4000 0.0001 0.0000 0.0000 0.0200 0.0200 ±0.88% 8214102
Test Files 1 passed (1)
Tests 2 passed (2)
Start at 14:45:32
Duration 14.30s (transform 25ms, setup 0ms, import 272ms, tests 13.61s, environment 0ms)
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-uqh8x6va?file=test%2Fsuite.bench.ts
Compare pnpm bench to CI=1 pnpm bench.
System Info
(N/A - Stackblitz)
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 22.22.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.8.2 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
@vitest/ui: latest => 4.1.9
vite: latest => 8.0.16
vitest: 5.0.0-beta.5 => 5.0.0-beta.5Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
feat: reportersIssues and PRs related to Vitest reportersp3-minor-bugAn edge case that only affects very specific usage (priority)
Type
Projects
- StatusShow more project fieldsApproved
Activity
sheremet-va commentedon Jun 17, 2026
This bug also affects any test that took longer than the slow threshold. It should print its parents in case they were not rendered somewhere here:
vitest/packages/vitest/src/node/reporters/base.ts
Line 201 in 6d6e46b
fix(reporters): print parent suite labels for non-TTY bench/slow rows
fix(reporters): print parent describe suites when the passed-test lis…