Change8

v5.0.0-beta.1

Breaking Changes
📦 vitestView on GitHub →
5 breaking3 features🐛 1 fixes🔧 5 symbols

Summary

This release introduces new reporting features and browser snapshot improvements, alongside several breaking changes related to inspection utilities and assertion behavior.

⚠️ Breaking Changes

  • Replaced `loupe.inspect` with pretty-format.
  • Quotes are removed from string values in `test.for/each` title `$` variable (second attempt).
  • Browser iframe scaling behavior has changed.
  • Coverage `include/exclude` globs are now less eager, potentially affecting which files are included/excluded.
  • The behavior of `toThrow("")` in `expect` has been fixed by reverting changes from a previous PR (#6710).

Migration Steps

  1. Replace all usages of `loupe.inspect` with the new pretty-format mechanism.
  2. Review coverage configuration (`include`/`exclude`) as globs are now less eager.

✨ New Features

  • Added `createReport` and established the `.vitest` report directory convention.
  • Browser: Exported aria tree utilities.
  • Browser: Added support for DOM snapshot trace view.

🐛 Bug Fixes

  • Tests now fail when a snapshot assertion is used within `test.fails`.

Affected Symbols