@vitest/expect
5.0.5 · 15 Oct 2026MIT151.9M / weekRepositoryHomepagenpmAtom feed
2.1.9 is the newest release of 2.x.
In short
1 new1 faster16 fixed2 internal
Release note
Features
This patch release includes a non-breaking feature for the experimental Browser Mode that doesn't follow SemVer. If you want to avoid picking up releases like this, make sure to pin the Vitest version in your package.json. See npm's documentation about semver for more information.
browser: Allow custom HTML path, respect plugins
transformIndexHtml
Bug Fixes
windows: Don't normalize drive case letter in root
browser: Fix default browser port
browser: Optimize expect-type
browser: Don't polyfill process.env
browser: Increment browser port automatically if there are several projects with browser.enabled
browser: Cleanup keyboard state
browser: Don't add
v=queries to setup files importsbrowser: User event cleanup on retry
browser: Ignore non mocked msw requests
browser: Initiate MSW in the same frame as tests
expect: Correct behavior of
toThrowErrorwith empty string parametermocker: Remove spy from peer dependencies
vitest: Print warnings form Vite plugins
vitest: Don't fail if the working directory starts with a lowercase drive letter
vitest: Silence import analysis warning
vitest,runner: Simplify
test.extendtype exports
Performance
Use
hashto replacecreateHash