NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2782 most downloaded on npm
UI for Vitest
Last release 4 days ago
30 Sep 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
5 years old
370 releases · first in 2021
One column per quarter.
Make fallbackCJS mode try resolve from /es/... and /lib/... - by @zthxxx in https://github.com/vitest-dev/vitest/issues/1633
/es/... and /lib/... - by @zthxxx in https://github.com/vitest-dev/vitest/issues/1633test.each and describe.each types - by @Demivan in https://github.com/vitest-dev/vitest/issues/1653TestSequencerConstructor typo - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/1618
ctx.log to ctx.logger.log, improve log flicking - by @userquin and @antfu in https://github.com/vitest-dev/vitest/issues/1166ctx.cache - by @antfu <samp>(695a7)</samp>Check related against forceRerunTriggers - by @elliotwestlake and @sheremet-va in https://github.com/vitest-dev/vitest/issues/1595
forceRerunTriggers - by @elliotwestlake and @sheremet-va in https://github.com/vitest-dev/vitest/issues/1595Add vite 3 support - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/1561
Rename mock types to match jest's `#1525` by @sheremet-va
#1525 by @sheremet-va#1531 by @sheremet-va#1522 by @sheremet-va#1529 by @sheremet-va#1538 by @KentoMoriwakiAllow redefining global expect, closes `#1496`
#1496#1431#1503#1511#1505#1510#1506Thanks to @antfu | @nieyuyao | @RedJanvier | @renovate[bot] | @sheremet-va
Reliably process css with css option `22fed1b8`
css option 22fed1b8Thanks to @sheremet-va | @stormwarning
Bind expect state to context `#1468`
#1468VITEST_POOL_ID #1473maxConcurrency option, 5 by default #1483#1477css config option, don't process CSS by default #1467#1462#1474#1489#1487can mock files with space in path
### Bug Fixes * correct export extension
vite-node: use .mjs for esm build
.mjs for esm build (692ad34)"type": "module" from vitest/package.json (#1411) (b4a9b0b), closes #325watchIgnore is renamed to watchExclude and now accepts only glob patterns (#1424) (3f5ff5b)don't escape $ in snapshots, when not needed
vite-node: options via CLI (fixes #1208)
improve test name escaping in TAP reporters
replace root when resolving dependency
simplify globals access, fix global != global
skip props from prototype when cloning
snapshot: only add indent when the line is not empty
try disable atomics for workers
make exports prop of proxy point to exports object
console: ignore empty stdout/stderr
calling global functions in happy-dom, refactor sharing global state
add animation frame methods to global (#1258) (34e177f), closes #1243
correctly order arguments in Jest diff util
### Bug Fixes * happy-dom v3 crashes
default to faled tests and unchecked snapshots when updating snapshots
### Features * add config option logHeapUsage
clear errors before running files
From Vitest v0.10.0, the callback style of declaring tests is deprecated. You can rewrite them to use async/await functions, or use Promise to mimic t…
From Vitest v0.10.0, the callback style of declaring tests is deprecated. You can rewrite them to use async/await functions, or use Promise to mimic the callback style.
- it('should work', (done) => {
+ it('should work', () => new Promise(done => {
// ...
done()
- })
+ }))
beforeAll / beforeEach cleanup callbackbeforeAll / beforeEach now accepts an optional cleanup function as the return value (equivalent to afterAll / afterEach).
import { beforeAll } from 'vitest'
beforeEach(async () => {
// called once before each test run
await startMocking()
// clean up function, called once after each test run
return async () => {
await stopMocking()
}
})
Learn more at:
Inspired by Playwright Fixtures, Vitest's test context allows you to define utils, states, and fixtures that can be used in your tests.
import { beforeEach, it } from 'vitest'
beforeEach((context) => {
// extend context
context.foo = 'bar'
})
it('should work', ({ foo }) => {
console.log(foo) // 'bar'
})
Learn more at Test Context
Due to the limitation of JavaScript, timing based Singleton pattern will cause conflicts when running multiple async functions in concurrent. Previously reported as #551. Thanks to the newly introduced Test Context, we can now provide a test specific expect instance to avoid conflicts. To use it, you can destructure the expect from each test context instead of the global one.
test.concurrent('test 1', async ({ expect }) => {
expect(foo).toMatchSnapshot()
})
test.concurrent('test 2', async ({ expect }) => {
expect(foo).toMatchSnapshot()
})
Now you can pass a path to file, or a package name to the reporters options to use custom reporter. Thanks to @ericjgagnon (#1136) (f2bceb2)
deps: update all non-major dependencies
Nothing published for this version
make automocking aware of symbol indexed methods
mock-api: provide an explainatory error message when the mocks API hoisting doesn't work
### Bug Fixes * downgrade engine requirement
remove depercated global option in favor of globals
ui: open in IDE and error styles
### Bug Fixes * relax engine requirements
vite-node: circular deps detection
### Bug Fixes * lower engines (#1006) (68ed206) * type error
prevent crashing when directory of outputFile does not exist
### Bug Fixes * vite-node: fix externalizing
### Features * outputTruncateLength option
vite-node: stub more api for import.meta.hot
### Bug Fixes * process.env.VITEST_MODE timing
process.env.VITEST_MODE timing (2254c91)### Features * expose process.env.VITEST_MODE (6647fa7) * new getRunningMode utils (3d6c41a) * new isFirstRun utils
vite-node: don't fallback to cjs by default
add Module symbol to export object
resolveId optional (aba4ea8)export Window interface in jsdom environment
export Vitest type from 'vitest', fix #877
Your coding agent can read these notes before it upgrades. Set up the MCP server →