Describe the bug
Currently, our codebase uses both it.todo (to signify unimplemented behaviors still needing tests) as well as it.skipIf/it.runIf to skip certain test cases inside certain entries of describe.each table-driven tests.
This results in numerous extra test cases that will literally never run under any circumstances and clog up summaries.
I was looking into using hideSkippedTests to remove all skipped entries from test reports, but realized that it would also remove mention of it.todos as well. (Given the test summary distinguishes between todo and skip, I'd assume the two would be treated differently here, or at least have the option to do so.)
Moreover, the skipped test count inside the test summary remained the same with the option enabled and disabled, meaning it doesn't truly hide all skipped tests as it claims to be the case.
Notes
This can be circumvented by wrapping test cases inside if blocks to avoid them being collected altogether, though significantly less ergonomic.
This occurs with every single reporter I checked that has a summary, so it's probably not a reporter issue.
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-hhsxu2z2?file=vite.config.ts
hideSkippedTests on:

hideSkippedTests off:

System Info
From 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: 20.19.1 - /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.0.18
vite: latest => 7.3.1
vitest: latest => 4.0.18
Used Package Manager
pnpm (also happens with npm on stackblitz)
Validations
Describe the bug
Currently, our codebase uses both
it.todo(to signify unimplemented behaviors still needing tests) as well asit.skipIf/it.runIfto skip certain test cases inside certain entries ofdescribe.eachtable-driven tests.This results in numerous extra test cases that will literally never run under any circumstances and clog up summaries.
I was looking into using
hideSkippedTeststo remove all skipped entries from test reports, but realized that it would also remove mention ofit.todos as well. (Given the test summary distinguishes betweentodoandskip, I'd assume the two would be treated differently here, or at least have the option to do so.)Moreover, the skipped test count inside the test summary remained the same with the option enabled and disabled, meaning it doesn't truly hide all skipped tests as it claims to be the case.
Notes
This can be circumvented by wrapping test cases inside
ifblocks to avoid them being collected altogether, though significantly less ergonomic.This occurs with every single reporter I checked that has a summary, so it's probably not a reporter issue.
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-hhsxu2z2?file=vite.config.ts
hideSkippedTestson:hideSkippedTestsoff:System Info
From 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: 20.19.1 - /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.0.18 vite: latest => 7.3.1 vitest: latest => 4.0.18Used Package Manager
pnpm(also happens withnpmon stackblitz)Validations