Back to Daily Feed 
Vitest v5 Beta: Major Changes & New Features Land
Must Read
Originally published on Vitest Releases
View Original Article
Share this article:
Summary & Key Takeaways
- Introduces
vi.when()for more flexible mocking. - Adds
screenshotDirectoryconfiguration for browser testing. - Updates
@sinonjs/fake-timersto support Temporal API mocking. - Clears mocks by default before each test, a notable breaking change.
- Changes default output directories for JSON, JUnit, and HTML reporters to
.vitest. - Removes the
webdriveriopackage, streamlining dependencies. - Hardens UI API access for improved security.
- Includes various bug fixes and stability improvements.
Our Commentary
Vitest v5 is shaping up to be a big one. Clearing mocks by default before each test? That's a bold move, but probably the right one for consistency. I'm genuinely curious how the community will adapt to some of these breaking changes. Supporting Temporal API mocking is a nice touch, showing they're keeping pace with modern JS. We're watching this beta closely.
View Original Article
Share this article: