NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #717 most downloaded on npm
Vitest module mocker implementation
Latest stable
5.1.1
Last release today
18 Nov 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
122 releases · first in 2024
Drag across the ruler to compare, or tap a release to open it.
Deprecate UserConfig in favor of ViteUserConfig - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6626 (496bd)
toBeNaN, toBeUndefined, toBeNull, toBeTruthy, toBeFalsy - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6697 <samp>(e0027)</samp>/mockServiceWorker.js instead of /__vitest_msw__ - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6687 <samp>(4b2ce)</samp>toMatchObject diff - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6620 <samp>(d289e)</samp><empty line> logs when interleaving console.log/error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6644 <samp>(9ece3)</samp>fast-glob instead of tinyglobby in Vitest - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6688 <samp>(70baa)</samp>Your coding agent can read these notes before it upgrades. Set up the MCP server →
Move Vitest.setServer to post configureServer hook to enable import analysis for workspace config loading - by @hi-ogawa in https://github.com/vitest-
Vitest.setServer to post configureServer hook to enable import analysis for workspace config loading - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6584 <samp>(e7f35)</samp>BenchmarkResult.samples array to reduce memory usage - by @hi-ogawa and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6541 <samp>(a6407)</samp>data: protocol on preview provider file upload - by @userquin in https://github.com/vitest-dev/vitest/issues/6501 <samp>(e9821)</samp>*.astro by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6565 <samp>(f8ff7)</samp>cleanOnRerun: false to invalidate previous results - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6592 <samp>(88bde)</samp>toBeDefined with expect.poll - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6562 <samp>(f7da6)</samp>--cpu-prof and --heap-prof not working by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/pull/6555 <samp>(2e4d894)</samp>beforeAll failed - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6524 <samp>(fb797)</samp>onTestFinished and onTestFailed during retry and repeats - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6609 <samp>(c5e29)</samp>--standalone - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6577 <samp>(d0bf8)</samp>Make example test callbacks async - by @aqandrew in https://github.com/vitest-dev/vitest/issues/6484 (16aa7)
This release makes another big change to the Browser Mode by introducing locators API:
This release makes another big change to the Browser Mode by introducing locators API:
test('renders blog posts', async () => {
const screen = page.render(<Blog />)
await expect.element(screen.getByRole('heading', { name: 'Blog' })).toBeInTheDocument()
const [firstPost] = screen.getByRole('listitem').all()
await firstPost.getByRole('button', { name: 'Delete' }).click()
expect(screen.getByRole('listitem').all()).toHaveLength(3)
})
You can use either vitest-browser-vue, vitest-browser-svelte or vitest-browser-react to render components and make assertions using locators. Locators are also available on the page object from @vitest/browser/context.
vitest.config.ts or vite.config.ts inside the folder)projects/* will match anything inside the projects folder. If it's a folder, we try to find the config inside that folder (if there is none, it is still treated as a project with the default config). If it's a file, it will be treated as a Vitest config. projects/**/* previously would assume that you only wanted to have folders as projects, but now it will match every single file insideprojects.userEvent.upload in playwright provider - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6442 <samp>(cf148)</samp>--inspect - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6433 <samp>(0499a)</samp>--inspect-brk - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6434 <samp>(7ab0f)</samp>--exclude-after-remap - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6309 <samp>(5932a)</samp>{ spy: true } instead of a factory - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6289 <samp>(95f02)</samp>vi.advanceTimersToNextFrame - by @bnjm and @sheremet-va in https://github.com/vitest-dev/vitest/issues/6347 <samp>(8ff63)</samp>fast-glob to tinyglobby - by @SuperchupuDev in https://github.com/vitest-dev/vitest/pull/6274 <samp>(c321a)</samp>index file - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6266 <samp>(081cf)</samp>expect.getState().testPath always returns correct path - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6472 <samp>(ac698)</samp>vitest and @vitest/* versions don't match - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6317 <samp>(e662c)</samp>vitenode for uncovered files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6044 <samp>(da52d)</samp>performance.now instead of Date.now for duration - by @LuciNyan in https://github.com/vitest-dev/vitest/issues/6382 <samp>(fe489)</samp>toMatchInlineSnapshot updates at the same location - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6332 <samp>(1606f)</samp>typecheck.include overlaps with include - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6256 <samp>(153ff)</samp>Support userEvent.upload in playwright provider - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6442 (cf148)
userEvent.upload in playwright provider - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6442 <samp>(cf148)</samp>--inspect - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6433 <samp>(0499a)</samp>--inspect-brk - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6434 <samp>(7ab0f)</samp>{ spy: true } instead of a factory - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6289 <samp>(95f02)</samp>performance.now instead of Date.now for duration - by @LuciNyan in https://github.com/vitest-dev/vitest/issues/6382 <samp>(fe489)</samp>One column per month.