πŸ§ͺ

Vitest

Open Source
4.7
Β· Editor's rating

Blazing-fast unit testing framework powered by Vite, offering Jest-compatible APIs with native ESM and TypeScript support.

4.7
Rating
open-source
Pricing Β· Free
Developer Tools
Category
windows, macos, linux
Platforms

✨ Key Features

Jest-compatible API for easy migration

Native ESM, TypeScript, and JSX support

Smart watch mode that reruns only affected tests

In-source testing and snapshot tests

Browser mode powered by Playwright

Shared config with your Vite project

Pros

  • Dramatically faster than Jest
  • Works with your existing Vite config
  • Migration from Jest is mostly painless

Cons

  • Ecosystem still younger than Jest
  • Browser mode is maturing

πŸ“ About Vitest

Vitest took everything painful about JavaScript unit testing and fixed it by building on Vite. Because it reuses your project’s existing Vite config and transforms, TypeScript, JSX, path aliases, and CSS imports all just work in tests with zero configuration. The result is a runner that is dramatically faster than Jest, especially in watch mode.

Compatibility was the masterstroke. Vitest ships a Jest-compatible API, so migrating an existing suite is often a dependency swap rather than a rewrite. Smart watch mode reruns only tests affected by your changes, coverage comes via c8 or istanbul, and browser mode runs tests in real browsers through Playwright when jsdom is not enough.

By 2026 Vitest has become the default for new Vite-based projects and increasingly for React and Vue libraries. If your Jest suite feels slow, this is the upgrade path.

Alternatives & Related Tools