NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #573 most downloaded on npm
Vitest snapshot manager
Latest stable
5.1.1
Last release 3 days ago
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
4 years old
196 releases · first in 2023
Drag across the ruler to compare, or tap a release to open it.
Add diff option - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4063 (b50cf)
diff option - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4063 <samp>(b50cf)</samp>coverage['100'] to istanbul provider - by @marcelobotega in https://github.com/vitest-dev/vitest/issues/4109 <samp>(a7e09)</samp>vi.waitFor method - by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4113 <samp>(d79cb)</samp>vi.waitUntil method - by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4129 <samp>(e0ac9)</samp>toThrow - by @Dunqing in https://github.com/vitest-dev/vitest/issues/3979 <samp>(725a0)</samp>testNamePattern - by @segrey in https://github.com/vitest-dev/vitest/issues/4103 and https://github.com/vitest-dev/vitest/issues/4104 <samp>(3c305)</samp>test.extend doesn't work in hooks without test - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4065 <samp>(175c7)</samp>SourceMapInput to fix CYCLIC_CROSS_CHUNK_REEXPORT - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4128 <samp>(ca70a)</samp>Your coding agent can read these notes before it upgrades. Set up the MCP server →
Resolving dep optimizer issues with workspace - by @thebanjomatic in https://github.com/vitest-dev/vitest/issues/4036 (0c13c)
coverage: Add allowExternal option - by @vojvodics and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3894 (c03fa)
allowExternal option - by @vojvodics and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3894 <samp>(c03fa)</samp>vitest/reporters - by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3980 <samp>(5704b)</samp>Allow importing CSS and assets inside external dependencies when using --experimental-vm-threads - by @sheremet-va in https://github.com/vitest-dev/vi
--experimental-vm-threads - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3880 <samp>(f4e6e)</samp>ctx.skip() inside the running test - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3966 <samp>(5c88d)</samp>execute.d.ts - by @btea in https://github.com/vitest-dev/vitest/issues/3970 <samp>(0f8e6)</samp>?inline query is specified - by @thebanjomatic and Adam Hines in https://github.com/vitest-dev/vitest/issues/3952 <samp>(3891d)</samp>Pass --experimental-vm-worker-memory-limit to tinypool - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3856 (3c67a)
--experimental-vm-worker-memory-limit to tinypool - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3856 <samp>(3c67a)</samp>Update istanbul-lib-instrument to v6 to fix vulnerable dependency - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3814 (f3bd9)
transformMode is now moved to server.transformMode. This option is highly discouraged to use. If you need to change the transform mode, use the new option testTransformMode instead to control the mode based on the running test, not the current file path. By default, tests with jsdom or happy-dom use web transform mode, and tests using node or edge environment use ssr mode. If you have a custom environment, it should provide transformMode property.coverage.reportOnFailure by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3615 <samp>(0c6f6)</samp>@vitest/coverage-c8 package - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3614 <samp>(a90d6)</samp>
@vitest/coverage-c8 is no longer supported. Please, use @vitest/coverage-v8 instead.experimentalVmThreads pool to run your tests using VM Sandboxes environment. Make sure you understand all pitfalls of this pool before opening an issue.server option - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3725 <samp>(dc4fa)</samp>
deps. options are now moved to server.deps with a deprecation warning. Please, consider using deps.optimizer instead of deps.inline/deps.external. Ideally, we would like to move away from using server.deps.inline altogether.vite-node index.ts --watch, you now have to do vite-node --watch index.ts.deps.optimizer is now enabled by default. This means that Vitest will bundle specified dependencies before running your tests. This field inherits options from optimizeDeps and ssr.optimizeDeps which are populated by other plugins (like, Svelte).describe.sequential - by @fenghan34 and @dammy001 in https://github.com/vitest-dev/vitest/issues/3771 <samp>(86934)</samp>--related --watch reruns non-affected tests if they were changed during a run - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3844 <samp>(c9aea)</samp>defineConfig type from vite - by @sodatea in https://github.com/vitest-dev/vitest/issues/3804 <samp>(9c8e3)</samp>toStrictEqual - by @Dunqing <samp>(52aef)</samp>istanbul-lib-instrument to v6 to fix vulnerable dependency - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3814 <samp>(f3bd9)</samp>deps.optimizer.web instead. If you test Node.js applications, consider adding external packages to server.deps.inline.Revert default include patterns - by @so1ve #3729
0.32.0 changed the default include globs to be compatible with Jest. After a discussion with the community, we are reverting this change because it turned out to be non-intuitive.browser: Correctly optimize CJS dependencies - by @sheremet-va (3d090)
Add concurrent option to sequence config - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3604 (f427f)
concurrent option to sequence config - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3604 <samp>(f427f)</samp>bench name - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3711 <samp>(a749a)</samp>test.extend - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3554 <samp>(2db1a)</samp>CTRL+C to terminate run - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3642 <samp>(fa663)</samp>toBeCalledTimes - by @antfu in https://github.com/vitest-dev/vitest/issues/3696 <samp>(d3640)</samp>v8 to prevent crash on dynamic CJS files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3657 <samp>(40f18)</samp>retry and repeats 0 - by @Dunqing in https://github.com/vitest-dev/vitest/issues/3638 <samp>(6d146)</samp>h key - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3618 <samp>(60c36)</samp>browser: Don't fail on importing diff-sequences - by @sheremet-va (00b0e)
Export registerConsoleShortcuts from vitest/node - by @deot in https://github.com/vitest-dev/vitest/issues/3563 (bc49b)
registerConsoleShortcuts from vitest/node - by @deot in https://github.com/vitest-dev/vitest/issues/3563 <samp>(bc49b)</samp>expect.unreachable - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3556 <samp>(8e385)</samp>describe/test name support anonymous function - by @btea in https://github.com/vitest-dev/vitest/issues/3562 <samp>(3d436)</samp>performance from perf_hooks - by @Max10240 and wangbaolong.wbl in https://github.com/vitest-dev/vitest/issues/3578 and https://github.com/vitest-dev/vitest/issues/3579 <samp>(24ec8)</samp>vitest - by @userquin in https://github.com/vitest-dev/vitest/issues/3580 <samp>(b4ac8)</samp>Vitest now uses v8 code coverage directly for better performance. @vitest/coverage-c8 is deprecated as Vitest no longer uses c8 package for coverage o…
test.js to be a test file. Also any file in __tests__ is now considered to be a test, not just files with test or spec suffix.@vitest/coverage-v8 package - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3339 <samp>(82112)</samp>
@vitest/coverage-c8 is deprecated as Vitest no longer uses c8 package for coverage output. It will not be updated anymore, and Vitest will fail in the next version if the user has c8 as their coverage provider. Please, install the new @vitest/coverage-v8 package if you previously used @vitest/coverage-c8.spy.mockRestore on auto-mocked named exports will no longer restore their implementation to the actual function. This behavior better matches what Jest does.expect.soft - by @Dunqing in https://github.com/vitest-dev/vitest/issues/3507 <samp>(7c687)</samp>describe/test name - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3497 <samp>(15253)</samp>Enable experimentalOptimizer - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3413 (5a894)
Support VITE_NODE_DEPS_MODULE_DIRECTORIES from .npmrc - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3471 (393bf)
VITE_NODE_DEPS_MODULE_DIRECTORIES from .npmrc - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3471 <samp>(393bf)</samp>Throw error if using inline snapshot inside of test.each or describe.each - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/iss
test.each or describe.each - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3360 <samp>(7c2f7)</samp>reportOnFailure option - by @AriPerkkio and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3453 <samp>(1988f)</samp>SIGINT is received - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3407 <samp>(a2cc2)</samp>rejects & resolves breaks with thenable objects - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3456 <samp>(4e996)</samp>birpc timeouts when Math.random mock is not restored - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3460 <samp>(cd5d5)</samp>less extension - by @rluvaton in https://github.com/vitest-dev/vitest/issues/3465 <samp>(4d045)</samp>PartialMock with async TReturns - by @ghry5 in https://github.com/vitest-dev/vitest/issues/3462 <samp>(b664d)</samp>watch: Press r should rerun current pattern tests - by @Dunqing and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3305 (69d27)
r should rerun current pattern tests - by @Dunqing and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3305 <samp>(69d27)</samp>cwd from test name filter - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3353 <samp>(324a9)</samp>toMatchInlineSnapshot fails when file path includes parentheses - by @pacexy in https://github.com/vitest-dev/vitest/issues/3370 and https://github.com/vitest-dev/vitest/issues/3371 <samp>(dcf13)</samp>Remove browser from allowed pools inside poolMatchGlob config option. Please, use Vitest workspaces for running tests in the browser.
Remove browser from allowed pools inside poolMatchGlob config option. Please, use Vitest workspaces for running tests in the browser.
Move assertion declarations to expect package - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3294 <samp>(cf3af)</samp>
- declare namespace Vi {
+ declare module 'vitest' {
interface Assertion<T = any> extends CustomMatchers<T> {}
interface AsymmetricMatchersContaining extends CustomMatchers {}
}
vi.hoisted to run code before imports are executed:vi.hoisted(() => vi.setSystemTime(new Date(2022, 1, 1)))
You can also use it to pass variables to vi.mock:const { mockedMethod } = vi.hoisted(() => {
return { mockedMethod: vi.fn() }
})
vi.mock('./path/to/module.js', () => {
return { originalMethod: mockedMethod }
})
--bail option for cancelling test run - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3163 <samp>(8d460)</samp>thresholdAutoUpdate to work with perFile - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3182 <samp>(29eeb)</samp>import.meta.hot.send mock - by @antfu <samp>(b1624)</samp>Do not rely on global performance and AggregateError - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3171 (cce45)
performance and AggregateError - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3171 <samp>(cce45)</samp>test.each respects chaiConfig - by @sheremet-va <samp>(4f6c1)</samp>toMatchFileSnapshot ensure dir exists - by @antfu in https://github.com/vitest-dev/vitest/issues/3155 <samp>(31168)</samp>skipWriting check - by @antfu <samp>(5436c)</samp>toMatchFileSnapshot - by @antfu in https://github.com/vitest-dev/vitest/issues/3164 <samp>(df3f2)</samp>Remove tinyspy internal properties on Vitest spies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3069 (2f1dc)
toMatchFileSnapshot and auto queuing expect promise - by @antfu in https://github.com/vitest-dev/vitest/issues/3116 <samp>(bdc06)</samp>One column per quarter.