-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
process.env.VITEST_POOL_ID not set in custom environments #9058
Copy link
Copy link
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
We wanted to update from vitest 3 to 4 but it came to a halt because we rely on process.env.VITEST_POOL_ID being set in the setup method of our custom environment. We use this pool id to ensure a postgresql database schema is cleaned and prepared for the test suite to run.
Reproduction
Setup a simple custom environment and do console.log(process.env.VITEST_POOL_ID) in the setup function logs undefined, but it's expected to log a numeric ID.
System Info
System:
OS: macOS 26.1
CPU: (12) arm64 Apple M3 Pro
Memory: 120.97 MB / 18.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.14.0 - /Users/anfr/.nvm/versions/node/v22.14.0/bin/node
npm: 10.9.2 - /Users/anfr/.nvm/versions/node/v22.14.0/bin/npm
pnpm: 9.13.2 - /Users/anfr/.nvm/versions/node/v22.14.0/bin/pnpm
Browsers:
Chrome: 142.0.7444.162
Safari: 26.1
npmPackages:
vitest: ^4.0.10 => 4.0.10Used Package Manager
pnpm
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)