Home/Web/Vitest
V
License:MIT
Open source Self-hostable

Vitest

About

A blazing-fast Vite-native unit test framework with ESM, TypeScript and JSX support out of the box. Shares your Vite config, plugins and aliases.

Pricing

Free

Vitest is a unit testing framework built on Vite. It reuses your Vite configuration — including plugins, aliases and environment — so tests run in the same conditions as your app.

Key Features

  • Vite-native: same config, plugins and transforms as your app.
  • Instant HMR for fast watch-mode feedback.
  • ESM, TypeScript and JSX out of the box.
  • Snapshot, mock and coverage tooling built in.
  • Worker-based parallelism across CPU cores.
  • Vitest Browser Mode for real-browser tests.

Pricing

Vitest is free and open source under the MIT license.

Getting Started

npm install -D vitest
import { describe, it, expect } from 'vitest';

it('adds numbers', () => expect(1 + 1).toBe(2));

Run npx vitest in watch mode or npx vitest run for CI.