v4.0.16
📦 vitestView on GitHub →
✨ 2 features🐛 9 fixes⚡ 1 deprecations🔧 6 symbols
Summary
Vitest v4.0.16 primarily delivers bug fixes, introduces the experimental `setupEnvironment` export, and deprecates `test.poolOptions`.
Migration Steps
- Remove or replace usage of `test.poolOptions` as it is now deprecated; migrate to the new configuration API if needed.
- Update imports to use `import { recordArtifact } from "vitest"` instead of previous paths.
- Do not call `suite` inside test functions; move suite definitions outside of tests.
- Verify that any fully dynamic imports still work as expected after the change.
✨ New Features
- Export `setupEnvironment` function for custom pools (experimental).
- Import `recordArtifact` directly from the vitest package.
🐛 Bug Fixes
- Restore browser mode default testTimeout to 15 seconds.
- Prevent crashes when `process.versions` is stubbed.
- Reject calling suite function inside a test.
- Allow inlining fully dynamic import.
- Fix module graph UI on HTML reporter when using headless browser mode.
- Log deprecated `test.poolOptions` if it's set.
- Browser: Fix `import.meta.env` define handling.
- Browser: Fix string formatting bug when including placeholders in console.log.
- Coverage: Disable source maps for Istanbul untested files.
🔧 Affected Symbols
test.poolOptionsrecordArtifactsetupEnvironmentimport.meta.envsuiteprocess.versions⚡ Deprecations
- `test.poolOptions` is deprecated; setting it will now log a warning.