
A Vite-native testing framework compatible with Jest for fast and integrated testing of JavaScript and TypeScript projects.
Vitest is a next-generation testing framework built on Vite, offering fast, lightweight, and integrated testing with Jest compatibility. It supports TypeScript, JSX, ESM, component testing, and smart watch mode for efficient test runs.
Reuses Vite's config, transformers, resolvers, and plugins to ensure consistent setup between app and tests.
Supports Jest-compatible APIs including expect, snapshot testing, coverage, and mocking for easy migration.
Instant test reruns triggered only by related changes, similar to Vite's Hot Module Replacement (HMR).
Supports ES modules, TypeScript, and JSX natively powered by Oxc without additional configuration.
Supports component testing for frameworks like Vue, React, Svelte, Lit, and Marko.
Allows running tests concurrently and filtering tests to speed up development feedback loops.
Provides native code coverage via v8 and instrumented coverage via Istanbul.
Includes Jest-compatible mocking APIs and supports happy-dom or jsdom for DOM and browser API mocking.
Add Vitest to your project using npm, yarn, or pnpm as a development dependency.
Create test files with .test. or .spec. in the filename and write tests using Vitest's Jest-compatible API.
Use your existing vite.config.* or create a vitest.config.* file for test-specific settings if needed.
Execute tests using the command 'vitest' for watch mode or 'vitest run' for a single run.
Leverage features like snapshot testing, mocking, coverage reports, and concurrent test execution.
Pricing details are gathered from the official Vitest website and are provided for reference only. Always confirm the latest information directly with the vendor.
| Plan | Price | Highlights |
|---|---|---|
| Free | $0 | Full access to all Vitest features
|
Explore tools grouped by use case so you can keep researching without losing momentum.
Compare other vetted products our editors see buyers evaluate alongside Vitest.