/posts/announcing-vitest-4.md
Announcing Vitest 4.0
October 22, 2025

Announcing Vitest 4.0

Michael Dong

Michael Dong

For more technical details about Vitest 4.0, see the blog post on the Vitest website or watch Vladimir's and Jessica's talk at ViteConf.

TL;DR: Vitest 4.0 is released with Browser Mode being marked stable, Visual Regression testing support, and Playwright Trace support. The Vitest team will focus on performance improvement in the upcoming quarter. This major release includes breaking changes.


Vitest’s usage has grown from 7M to 17M weekly downloads in the past year. Almost one year after the last major release, we’re excited to announce Vitest 4.0 is now available.

Browser Mode is stable

Browser Mode is now stable as part of Vitest 4.0 after being in beta. This has been one of Vitest’s longest-requested features. Browser Mode allows developers to test their UI components in a real browser environment instead of a simulated one like JSDOM.

Because tests run in the browser natively, it provides much higher confidence that components will look and behave correctly for actual users. All while using the same familiar Vitest API without any code changes.

Vitest Browser Mode uses providers like Playwright to run your tests in a real browser. It isn't a new testing framework and doesn't replace E2E tools; it just changes the environment where your existing tests run.

Additional updates

In tandem with Browser Mode, Vitest 4.0 adds support for Visual Regression Test and Playwright Traces:

  • Visual Regression testing in Browser mode takes screenshots of components and compares them against a reference image to catch unintended visual changes during the test.
  • Playwright Traces generates detailed trace files that can be analyzed in Playwright's Trace Viewer for easier debugging.

Other features include reporter updates, type-aware hooks, and more. Read more here.

Breaking changes

Vitest 4.0 is a major release and comes with breaking changes. Please review the migration guide before upgrading.

What’s next

The team will continue to polish Browser Mode while improving overall performance for Vitest.

We would love to hear your feedback on Vitest 4.0, and are excited to see how it helps improve your development workflow.

Connect with us:

Get all of our updates directly to your inbox. Sign up for our newsletter.

04CallToAction.vue

Interested in the future of JavaScript tooling and want to stay ahead of the curve?

We’d love to talk to you.

ContactButton.vueserved in 13ms@click=”contact”