uvu vs Vitest: Tiny Runner or Full Framework?
uvu is an extremely small and fast test runner with minimal features; Vitest is a feature-rich, Vite-powered framework with mocks, snapshots, and coverage.
uvu is a tiny, dependency-light runner focused on raw speed and fast startup, with a minimal API and no built-in mocking, snapshots, or coverage - you add tools as needed. Vitest is a full framework that reuses Vite config, offers a Jest-like API, watch mode, mocking, snapshots, and coverage, and suits modern Vite/TS apps. uvu is about minimal footprint and speed; Vitest is about features and integration.
| uvu | Vitest | |
|---|---|---|
| Size / startup | Tiny, very fast | Larger, fast (Vite) |
| Features | Minimal | Mocks, snapshots, coverage |
| TS / Vite | Manual setup | First-class |
| Watch mode | No | Yes (HMR) |
| Best for | Tiny libs, speed | Vite/TS apps |
In CI
uvu is great for small libraries that want minimal dependencies and the fastest possible startup, accepting that you wire up TS, coverage, and mocking yourself. Vitest fits apps wanting an integrated, full-featured runner with coverage and snapshots built in. Both parallelize in CI; choose uvu for minimalism, Vitest for features.
Speed it up
Cache dependencies and shard tests across jobs to reduce wall-clock time. Both run on CI runners; faster managed runners shorten test execution and transform steps.
The verdict
Writing a small library that prizes tiny footprint and fast startup: uvu. Building a Vite or TypeScript app wanting mocks, snapshots, coverage, and watch mode: Vitest. Most app teams choose Vitest; uvu suits minimalist libraries and microbenchmarks.