# Vitest v5.0.0
- Product: Vitest (https://whatsnew.fyi/product/vitest)
- Vendor: VoidZero
- Date: 2026-09-03
- Version: v5.0.0
- Original notes: https://github.com/vitest-dev/vitest/releases/tag/v5.0.0
- Permalink: https://whatsnew.fyi/product/vitest/releases/v5.0.0
What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog.
Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'.
---
- **changed** — Replace loupe.inspect with pretty-format
- **changed** — Remove quotes from string values in test.for/each title $ variable
- **changed** — Change default attachmentsDir from .vitest-attachements/ to .vitest/attachments/
- **removed** — Remove sequential test/suite options in favor of concurrent
- **changed** — Represent locator as an object instead of a string
- **changed** — Inline expect package
- **removed** — Remove deprecated entry points
- **changed** — Require Node.js 22 and Vite 6.4
- **changed** — Fail expect.poll when function didn't resolve in time
- **changed** — Throw an error if hoistable methods are outside the top level scope
- **changed** — Make toHaveTextContent strict and add toMatchTextContent as alternative
- **changed** — Don't lookup config file from ancestor directories
- **removed** — Inline @vitest/runner package and do not publish it anymore
- **changed** — Allow mutating happy-dom/jsdom window object
- **changed** — Expose concurrencyId/workerId on TestModule's diagnostics and make id 1-based
- **added** — Add screenshotDirectory config to browser.expect.toMatchScreenshot
- **changed** — Update @sinonjs/fake-timers and support mocking Temporal
- **removed** — Remove webdriverio package
- **changed** — Clear mocks by default before each test
- **changed** — Support nested projects
Vitest 5 is officially out! This release focuses on performance and brings a lot of new features while fixing long-standing bugs. See our [blog post](https://vitest.dev/blog/vitest-5.html) for the official announcement.
###### 🚨 Breaking Changes
- Replace `loupe.inspect` with pretty-format - by @hi-ogawa, **Claude Opus 5 (1M context)** and **OpenAI Codex** in https://github.com/vitest-dev/vitest/issues/9609 [(3f802)](https://github.com/vitest-dev/vitest/commit/3f802da4b)
- Remove quotes from string values in `test.for/each` title `$` variable (take 2) - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/10170 [(04d37)](https://github.com/vitest-dev/vitest/commit/04d37e9d7)
- Default `attachmentsDir` from `.vitest-attachements/` to `.vitest/attachments/` - by @MdSadiqMd in https://github.com/vitest-dev/vitest/issues/10186 [(1ba73)](https://github.com/vitest-dev/vitest/commit/1ba7338c3)
- Remove `sequential` test/suite options in favor of `concurrent` - by @hi-ogawa and **OpenAI Codex** in https://github.com/vitest-dev/vitest/issues/10198 [(9229f)](https://github.com/vitest-dev/vitest/commit/9229f2edc)
- Represent locator as an object instead of a string - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10212 [(80f07)](https://github.com/vitest-dev/vitest/commit/80f07edf6)
- Inline `expect` package - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10221 [(ad162)](https://github.com/vitest-dev/vitest/commit/ad16223e7)
- Remove deprecated entry points - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10222 [(994c6)](https://github.com/vitest-dev/vitest/commit/994c6ddb9)
- Require Node.js 22 and Vite 6.4 - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10178 [(38762)](https://github.com/vitest-dev/vitest/commit/3876283e8)
- Fail `expect.poll` when function didn't resolve in time - by @hi-ogawa and **OpenAI Codex** in https://github.com/vitest-dev/vitest/issues/10233 [(4df04)](https://github.com/vitest-dev/vitest/commit/4df048c11)
- Throw an error if hoistable methods are outside the top level scope - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10460 [(d0b4f)](https://github.com/vitest-dev/vitest/commit/d0b4fddcb)
- `toHaveTextContent` is strict, add `toMatchTextContent` as alternative - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10473 [(18f30)](https://github.com/vitest-dev/vitest/commit/18f303079)
- Don't lookup config file from ancestor directories - by @hi-ogawa, **OpenAI Codex** and **Hiroshi Ogawa** in https://github.com/vitest-dev/vitest/issues/10428 [(945d9)](https://github.com/vitest-dev/vitest/commit/945d9090e)
- Inline `@vitest/runner` package, do not publish it anymore - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10511 [(6d6e4)](https://github.com/vitest-dev/vitest/commit/6d6e46b1e)
- Allow mutating happy-dom/jsdom window object - by @hi-ogawa, **Hiroshi Ogawa** and **OpenAI Codex** in https://github.com/vitest-dev/vitest/issues/10373 [(206e8)](https://github.com/vitest-dev/vitest/commit/206e8cff8)
- Expose `concurrencyId`/`workerId` on TestModule's diagnostics, make id 1-based - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10516 [(bdd98)](https://github.com/vitest-dev/vitest/commit/bdd985433)
- Add `screenshotDirectory` config to `browser.expect.toMatchScreenshot` - by @macarie in https://github.com/vitest-dev/vitest/issues/10592 [(a60de)](https://github.com/vitest-dev/vitest/commit/a60ded0fb)
- Update `@sinonjs/fake-timers` and support mockin
_[Truncated at 4000 characters — full notes: https://github.com/vitest-dev/vitest/releases/tag/v5.0.0]_