v5.0.0-beta.3
Breaking Changes📦 vitestView on GitHub →
⚠ 2 breaking✨ 6 features🐛 19 fixes🔧 12 symbols
Summary
This release introduces support for TypeScript build mode and enhances browser testing capabilities with better tracing and error reporting. It also enforces stricter requirements for Node.js and Vite versions.
⚠️ Breaking Changes
- Requires Node.js 22 and Vite 6.4. Users must upgrade their Node.js and Vite versions.
- expect.poll will now fail if the provided function does not resolve within the specified timeout period.
Migration Steps
- Ensure Node.js version is 22 or higher.
- Ensure Vite version is 6.4 or higher.
✨ New Features
- Support for typescript build mode.
- Exposed logs recorded during the test via the API.
- Browser: Show aria tree on locator element error.
- Browser: Support custom `kind` in `page.mark`.
- Browser: Live update trace view on watch UI.
- Browser: Added `context.mark` for custom command tracing.
🐛 Bug Fixes
- Shell injection safety improved via github.ref_name in publish workflow.
- Made `attachmentsDir` a root-only configuration setting.
- Applied cjs interop for truthy `__esModule`.
- Browser: Simplified orchestrator otel carrier.
- Browser: Removed orphaned Playwright route when the same module is mocked via multiple IDs.
- Browser: Skipped `wrapDynamicImport` transform on ssr environment.
- CLI: Respects `FORCE_COLOR` over agent detection.
- Coverage: `exclude` configuration no longer inherits negation globs from `test.include`.
- Deps: Updated fake-timers to 15.3.2, adding support for `toNotFake`.
- Expect: Allowed readonly arrays and sets in `toBeOneOf`.
- JUnit: Included unhandled errors in JUnit XML report.
- Reporter: Guarded against non-finite `slowTestThreshold` in summary reporter.
- Reporter: Fixed non-existing import subpath module blob serialization.
- Reporters: Fixed blob file name when a label is present.
- Reporters: `summary` reporter now intercepts logger's streams even when they are not `process.std*` streams.
- Reporters: Fixed missing `testModules` in `onTestRunEnd` when merging blobs from different root directory test runs.
- Runner: Removed AbortSignal listener leak in `withCancel`.
- UI: Fixed duplicate colored error message.
- UI: Fixed missing source code in html reporter metadata when merging blobs with different root directory test runs.