Vitest 3.0 released: Major overhaul with enhanced testing and reporting features
Vitest 3.0 has been released, bringing significant updates to this Vite-native testing framework. The latest version includes a complete overhaul of the test run reporting system, resulting in reduced flicker and more stable output. The public reporter API has also been redesigned for improved lifecycle comprehension.
A notable change in Vitest 3.0 is the elimination of separate files for workspace definition. Users can now specify an array of projects directly in the workspace field within the vitest.config file. Additionally, a new method for running browser tests has been introduced. By defining an array of instances, users can now execute browser tests in various setups with enhanced performance and caching. This approach allows for a single Vite server to serve files, processed once, regardless of the number of browsers tested.
The update also introduces the ability to filter tests by line number and features a redesigned public API accessible via vitest/node. The team plans to remove the experimental tag from this API in an upcoming minor release. While Vitest 3 includes a few minor breaking changes, these are unlikely to impact most users. However, it is recommended to review the detailed Migration Guide before proceeding with the upgrade.