NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #489 most downloaded on npm
Fork of pretty-format with support for ESM
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
132 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>Make spec into a class instead of a tuple - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6355 (874a1)
--exclude-after-remap - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6309 <samp>(5932a)</samp>vi.advanceTimersToNextFrame - by @bnjm and @sheremet-va in https://github.com/vitest-dev/vitest/issues/6347 <samp>(8ff63)</samp>vitenode for uncovered files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6044 <samp>(da52d)</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>vitest: Add "provide" option - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6253 (4409d)
@testing-library/framework packages <samp>(d79511)</samp>
testing-library that relies solely on querySelector and closest.click/.fill and other userEvent methodsvitest and @vitest/* versions don't match - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6317 <samp>(e662c)</samp>browser: Keep querying elements even if locator is created with elementLocator, add pubic @vitest/browser/utils - by @sheremet-va in https://github.co
browser: Use documentElement as the root for selector - by @sheremet-va (d8077)
*No significant changes* ##### View changes on GitHub
No significant changes
Move page.config to server.config, add more docs - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6252 (af2b8)
index file - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6266 <samp>(081cf)</samp>Introduce experimental reported tasks - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6149 (13d85)
testNamePattern adds leading space - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6186 <samp>(073a5)</samp>afterEach cleanup hooks in node entrypoint - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6192 <samp>(e6fbc)</samp>defineProject and defineWorkspace types - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6198 <samp>(8cd82)</samp>node:* imports in __mocks__ folder - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6204 <samp>(a48be)</samp>One-line environment options - by @hahanein in https://github.com/vitest-dev/vitest/issues/5105 (38269)
require - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6159 <samp>(807a2)</samp>*.cts files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6189 <samp>(5da45)</samp>thresholds.<glob>.100 option - by @thor-juhasz and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6174 <samp>(f6845)</samp>mockImplementation for function overload and unions - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6181 <samp>(7a75b)</samp>ui: Show all suites/tests when parent matches - by @userquin in https://github.com/vitest-dev/vitest/issues/6106 (840e0)
--inspect-brk stop on Windows - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6110 <samp>(f8519)</samp>vi.spyOn to MockInstance of function overload - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6086 <samp>(e9f9a)</samp>Remove @vitest/runner > pretty-format from prebundling because it doesn't exist - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6075
crypto.randomUUID from the client - by @userquin in https://github.com/vitest-dev/vitest/issues/6079 <samp>(04c83)</samp>vitest - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6060 <samp>(95a2d)</samp>One column per month.