-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
p2-edge-caseBug, but has workaround or limited in scope (priority)Bug, but has workaround or limited in scope (priority)
Description
Describe the bug
When running vitest with the --maxWorkers option only, we get an error
> RangeError: options.minThreads and options.maxThreads must not conflict
I believe this is because the default for minThreads is number of available CPUs, which can be higher than what we set as maxWorkers.
Perhaps the solution would be to keep minThreads as undefined by default, or limit it to Math.max(maxThreads)?
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-abe49vgn
npx vitest run --maxWorkers 3
> RangeError: options.minThreads and options.maxThreads must not conflictSystem Info
System:
OS: macOS 15.4
CPU: (8) arm64 Apple M1 Pro
Memory: 91.27 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.8.0 - ~/.nvm/versions/node/v20.8.0/bin/node
npm: 10.5.0 - ~/.nvm/versions/node/v20.8.0/bin/npm
pnpm: 9.15.5 - ~/Library/pnpm/pnpm
Watchman: 2024.12.02.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 136.0.7103.93
Safari: 18.4
npmPackages:
@vitejs/plugin-react: 4.3.4 => 4.3.4
vite: 5.4.18 => 5.4.18
vitest: 3.0.9 => 3.0.9Used 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
p2-edge-caseBug, but has workaround or limited in scope (priority)Bug, but has workaround or limited in scope (priority)