By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: Vitest Team Releases Version 4.0 with Stable Browser Mode and Visual Regression Testing
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > News > Vitest Team Releases Version 4.0 with Stable Browser Mode and Visual Regression Testing
News

Vitest Team Releases Version 4.0 with Stable Browser Mode and Visual Regression Testing

News Room
Last updated: 2025/12/05 at 1:48 PM
News Room Published 5 December 2025
Share
Vitest Team Releases Version 4.0 with Stable Browser Mode and Visual Regression Testing
SHARE

Vitest, the Vite-native testing framework, has released version 4.0, delivering improvements to browser-based testing, visual regression capabilities, and developer experience enhancements.

Vitest 4.0 introduces several major features, including Browser Mode graduating to stable status, built-in visual regression testing support, Playwright Traces integration, and enhanced debugging capabilities. The release also includes breaking changes that require developers to review the migration path before upgrading.

A significant new feature in Vitest 4.0 is the stabilization of Browser Mode, which has been in experimental status since earlier versions. This feature allows developers to run tests in real browsers rather than simulated environments like jsdom or happy-dom, providing more accurate testing results. To use Browser Mode, developers now need to install separate provider packages such as @vitest/browser-playwright, @vitest/browser-webdriverio, or @vitest/browser-preview. This change simplifies working with custom options and eliminates the need for TypeScript reference directives.

The context import location has also changed. Previously imported from @vitest/browser/context, developers should now import from vitest/browser directly, though the old import path will continue working until the next major version for compatibility.

Visual regression testing in Vitest 4.0 can be accomplished through the toMatchScreenshot assertion. Vitest captures screenshots of UI components and pages, then compares them against reference images to detect unintended visual changes. Alongside this feature, Vitest introduces a toBeInViewport matcher that allows developers to check if an element is currently in the viewport using the IntersectionObserver API.

Vitest 4.0 supports generating Playwright Traces for browser tests. Developers can enable tracing by setting the trace option in the test.browser configuration or passing the browser.trace flag with options including on, off, on-first-retry, on-all-retries, and retain-on-failure. The traces are available in reporters as annotations, and can be viewed using the Playwright Trace Viewer.

The vscode extension now supports a Debug Test button when running browser tests, improving the debugging experience. Developers can also start Vitest with the inspect flag when using playwright and webdriverio providers to connect to DevTools manually.

Reporter updates include the removal of the basic reporter, which can be replaced with the default reporter using summary: false. The default reporter now only prints tests in a tree format when running a single test file, while a new tree reporter is available for developers who prefer always seeing tests as a tree. The verbose reporter now consistently prints tests one by one when finished, whereas previously this behaviour only occurred in CI environments.

The community response to Vitest 4.0 has highlighted several key improvements. A Reddit user noted that having visual regression testing natively integrated means one less dependency to manage compared to bolt-on solutions like Percy or Chromatic. The same developer praised the developer experience improvements, stating that watch mode performance has been consistently better than Jest, and that Vitest now feels like a more complete testing solution with features that previously required separate tools.

However, some developers have encountered issues during the upgrade. A recent GitHub issue reports a TypeScript error when using Vitest 4.x with Vite versions 7.1.0 or earlier, despite Vitest 4.x listing vite versions ^6.0.0 or ^7.0.0 as compatible dependencies. The error manifests as a missing createImportMeta property on ModuleRunnerOptions, and only occurs when the vitest.config.ts file is included in the TypeScript context. The issue has been tagged as a minor bug affecting specific usage patterns.

Vitest 4.0 has breaking changes that could affect existing projects. The Vitest team has published a detailed Migration Guide to help developers transition from earlier versions. The complete list of changes is available in the Vitest 4 Changelog on GitHub.

According to the VoidZero blog, Vitest usage has grown from 7 million to 17 million weekly downloads in the past year.

Vitest is an open-source testing framework developed for Vite projects but can be used independently. It provides Jest-compatible APIs including expect, snapshot, and coverage features, with first-class support for ESM, TypeScript, and JSX powered by esbuild.

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article As Ethereum (ETH) Struggles in Q4 This New Altcoin Surges 250% Hits 95% Phase 6 Allocation | HackerNoon As Ethereum (ETH) Struggles in Q4 This New Altcoin Surges 250% Hits 95% Phase 6 Allocation | HackerNoon
Next Article The 2026 Social Media Holiday Calendar for Your Content Strategy The 2026 Social Media Holiday Calendar for Your Content Strategy
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

AWS announces Graviton 5, its next-generation custom CPU for cloud workloads
AWS announces Graviton 5, its next-generation custom CPU for cloud workloads
Mobile
AWS supercharges agentic development with AgentCore –  News
AWS supercharges agentic development with AgentCore – News
News
Cloudflare implements 'fix' weeks after another issue
Cloudflare implements 'fix' weeks after another issue
News
Feds investigate Waymo robotaxis reportedly passing school buses
Feds investigate Waymo robotaxis reportedly passing school buses
Software

You Might also Like

AWS supercharges agentic development with AgentCore –  News
News

AWS supercharges agentic development with AgentCore – News

5 Min Read
Cloudflare implements 'fix' weeks after another issue
News

Cloudflare implements 'fix' weeks after another issue

0 Min Read
Gboard’s Expressive redesign and emoji tweaks finally start appearing
News

Gboard’s Expressive redesign and emoji tweaks finally start appearing

2 Min Read

.zfkGnfHhSunsSksFuusnnHh

0 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?