v4.1.0-beta.5
📦 vitestView on GitHub →
✨ 7 features🐛 17 fixes🔧 5 symbols
Summary
This release introduces new mocking utilities like mockThrow, enhances browser testing with BlazeDiff and strict mode support, and adds a new coverage option to report only changed files. Numerous bug fixes address issues related to error propagation, concurrency, and module resolution.
✨ New Features
- Implement mockThrow and mockThrowOnce.
- Support update: "none" and add docs about snapshots behavior on CI.
- Support playwright launchOptions with connectOptions.
- Browser: Use BlazeDiff instead of pixelmatch.
- Browser: Add findElement and enable strict mode in webdriverio and preview.
- Coverage: Add coverage.changed option to report only changed files.
- UI: Implement filter for slow tests.
🐛 Bug Fixes
- Don't propagate nested aroundEach/All errors but aggregate them on runner.
- Show a better error if there is a pending dynamic import.
- Preserve stack trace of resolves/rejects chained assertion error.
- Handle module-sync condition in vmThreads/vmForks require.
- Hooks should respect maxConcurrency.
- Recursively autospy module object.
- Remove trailing spaces from diff error log.
- Respect project resolve.conditions for externals.
- Use object for WeakMap instead of a symbol to support webcontainers.
- Fix re-mocking virtual module.
- Cancelling should stop current test immediately.
- Make mockObject change backwards compatible.
- Browser: Remove --remote-debugging-address from chrome args.
- Browser: Make sure userEvent actions support ensureAwaited.
- Reporter: dot reporter leaves pending tests.
- Runner: Mark repeated tests as finished on last run.
- Types: bench.reporters no longer gives type errors when passing file name string paths.