-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)pr welcome
Description
Describe the bug
When running the tests in a random order, the seed will not be logged.
vitest/packages/vitest/src/node/logger.ts
Lines 235 to 237 in 7ce3417
| if (this.ctx.config.sequence.sequencer === RandomSequencer) { | |
| this.log(PAD + c.gray(`Running tests with seed "${this.ctx.config.sequence.seed}"`)) | |
| } |
This does not work:
sequence: {
shuffle: {
tests: true
}
}This works:
sequence: {
shuffle: {
files: true
}
}
// or
sequence: {
shuffle: true
}It's actually been happening for a very long time, probably every since the shuffle.files/shuffle.tests settings were introduced.
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-ahqdjnan?file=vite.config.ts&initialPath=__vitest__/
System Info
System:
OS: Windows 11 10.0.26200
CPU: (32) x64 AMD Ryzen 9 9950X3D 16-Core Processor
Memory: 34.22 GB / 63.58 GB
Binaries:
Node: 25.4.0 - C:\Program Files\nodejs\node.EXE
npm: 11.7.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 144.0.7559.110
Edge: Chromium (140.0.3485.54)
Firefox: 147.0 - C:\Program Files\Mozilla Firefox\firefox.exe
npmPackages:
@vitejs/plugin-react: ^5.1.2 => 5.1.2
@vitest/browser-playwright: ^4.0.16 => 4.0.18
@vitest/coverage-istanbul: ^4.0.16 => 4.0.18
playwright: ~1.58.0 => 1.58.0
vite: ^8.0.0-beta.11 => 8.0.0-beta.11
vitest: ^4.0.17 => 4.0.18
vitest-browser-react: ^2.0.2 => 2.0.5Used Package Manager
npm
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)pr welcome
Type
Projects
Status
Approved