Skip to content

5.0.0-beta.5 bench: describe labels and nesting not displayed correctly when running in CI #10606

Closed

Description

@uncenter

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.5

Used Package Manager

pnpm

Validations

Activity

  1. added theissue type on Jun 15, 2026
  2. sheremet-va commented on Jun 17, 2026

    @sheremet-va
    Member

    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:

    this.printTestCase(moduleState, child)

  3. added
    p3-minor-bug
    feat: reporters
    and removed on Jun 17, 2026
  4. moved this to Approved in Team Boardon Jun 17, 2026
  5. added a commit that references this issue on Jul 4, 2026
    6f622c3
  6. added a commit that references this issue on Aug 11, 2026
    658affe
  7. locked and limited conversation to collaborators on Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat: reportersp3-minor-bug

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions