-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
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
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 with npm on stackblitz)
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
Type
Projects
Status

