# Vitest v4.1.0 — Release & Upgrade Intelligence
- **Product:** Vitest (https://vitest.dev)
- **Version:** v4.1.0
- **Released:** Mar 12, 2026
- **Impact Score:** 5/10
- **Breaking Changes:** Not verified
- **Canonical Analysis:** https://changelogs.us/vitest/updates/v4.1.0/

## Executive Summary (TL;DR)
Vitest v4.1.0. Source highlight: This release page lists all changes made to the project during the 4.1 beta. To get a review of all the new features, read our blog post.

## New Features
- Return a disposable from doMock() &nbsp;-&nbsp; by @kirkwaiblinger in https://github.com/vitest-dev/vitest/issues/9332 <samp>(e3e65)</samp>
- Added chai style assertions &nbsp;-&nbsp; by @ronnakamoto and @sheremet-va in https://github.com/vitest-dev/vitest/issues/8842 <samp>(841df)</samp>
- Update to sinon/fake-timers v15 and add `setTickMode` to timer controls &nbsp;-&nbsp; by @atscott and @sheremet-va in https://github.com/vitest-dev/vitest/issues/8726 <samp>(4b480)</samp>
- Expose matcher types &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9448 <samp>(3e4b9)</samp>
- Add `toTestSpecification` to reported tasks &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9464 <samp>(1a470)</samp>
- Show a warning if `vi.mock` or `vi.hoisted` are declared outside of top level of the module &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9387 <samp>(5db54)</samp>

## Improvements
- **pretty-format**: Combine DOMElement plugins &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9581 <samp>(da85a)</samp>

## Bug Fixes
- Support vite 8 beta, fix type issues in the config with different vite versions &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9587 <samp>(99028)</samp>
- Deprecate several vitest/* entry points &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9347 <samp>(fd459)</samp>
- Use `meta.url` in `createRequire` &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9441 <samp>(e3422)</samp>
- Preact browser mode init example of render function not async &nbsp;-&nbsp; by @WuMingDao in https://github.com/vitest-dev/vitest/issues/9375 <samp>(2bea5)</samp>
- Deprecate unused types in matcher context &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9449 <samp>(20f87)</samp>
- Handle `external/noExternal` during `configEnvironment` hook &nbsp;-&nbsp; by @hi-ogawa and **Claude Opus 4.6** in https://github.com/vitest-dev/vitest/issues/9508 <samp>(59ea2)</samp>
