/posts/announcing-vitest-4.md
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 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.
In tandem with Browser Mode, Vitest 4.0 adds support for Visual Regression Test and Playwright Traces:
Other features include reporter updates, type-aware hooks, and more. Read more here.
Vitest 4.0 is a major release and comes with breaking changes. Please review the migration guide before upgrading.
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:
CallToAction.vue