Vitest
vitest.dev
- Free plan
- Windows
- macOS
- Linux
- Web
What Vitest is
Vitest is a testing framework powered by Vite for JavaScript and TypeScript projects, though it can also run without Vite. It can reuse Vite configuration, plugins, resolvers and transform pipelines. Jest-compatible APIs cover assertions, snapshots and mocking, which can support migration from Jest. Watch mode reruns tests related to changed source or test files, and TypeScript, JSX and ES modules are supported out of the box. Browser Mode runs tests in a browser and supports Playwright and WebdriverIO providers. Component testing is listed for Vue, React, Svelte, Lit, Marko and other frameworks. Coverage can use V8 or Istanbul, and benchmarking is powered by Tinybench. Vitest has an official Visual Studio Code extension and can be tried in a browser through StackBlitz without a local installation. It is free and open source, with no plan limits stated. The stated requirements are Vite 6.4.0 or later and Node 22.12.0 or later. Help is available through the Vitest Discord community and GitHub Discussions.
Who it suits
It suits developers building JavaScript or TypeScript projects who want a Vite-integrated test runner or Jest-compatible APIs. Teams also looking for browser or component testing can consider its listed modes and framework support.
Good to know, and what to watch
- Can reuse Vite configuration and plugins.
- Jest-compatible APIs cover assertions, snapshots and mocking.
- Watch mode reruns related tests after changes.
- Browser Mode supports Playwright and WebdriverIO providers.
- Free and open source.
- Requires Vite 6.4.0 or later.
- Requires Node 22.12.0 or later.
Plans
Every plan and priceFree and open source
Free plan
Getting started
- Open the Vitest website
- Install or configure Vitest with Vite 6.4.0 or later and Node 22.12.0 or later
- Reuse your Vite configuration, plugins, resolvers and transform pipelines, or run without Vite
- Use StackBlitz to try Vitest in a browser without local installation
- Add the official Visual Studio Code extension if you want editor integration
The Club's review
Overview
Vitest is a Vite-powered testing framework for JavaScript and TypeScript. It is best suited to teams building with Vite, or to Jest users who want familiar testing APIs while moving to another tool. The free, open-source offering is compelling, provided your project can use Vite 6.4.0 or later and Node 22.12.0 or later.
Vitest can also run without Vite, so it remains an option for projects using other build arrangements. Its breadth is notable: the same framework covers focused unit work, browser execution, component checks, coverage and benchmarks. That range makes it a practical general-purpose choice, although projects on older runtimes will need to upgrade before adoption.
Key features
Vite integration is Vitest's clearest advantage. Tests can reuse Vite configuration, plugins, resolvers and transform pipelines, keeping test processing close to the application setup and reducing duplicated configuration. Running independently of Vite is useful when you want the framework's test features without committing to Vite itself.
Jest-compatible APIs for assertions, snapshots and mocking provide a familiar surface for Jest teams. This can shorten the learning curve and support migration, but compatibility should not be treated as a promise that every existing test will transfer unchanged.
Watch mode reruns tests related to changed source or test files, which keeps feedback targeted during active development. TypeScript, JSX and ES modules work without additional language setup. Built-in mocks, parameterized cases, property-based checks, snapshot testing and parallel execution cover a wide range of ordinary test designs.
Browser Mode executes tests natively in a browser and supports Playwright and WebdriverIO providers, giving teams a browser-based path when a runtime closer to the user environment matters. Component testing is available for Vue, React, Svelte, Lit, Marko and other frameworks. Coverage can use V8 or Istanbul, while Tinybench powers benchmarking. An official Visual Studio Code extension supports editor workflows, and StackBlitz lets prospective users try Vitest in a browser without installing it locally.
Pricing
Vitest is free and open source. The Free and open source plan costs nothing, with no plan limits stated. That makes it suitable for individual developers, open-source maintainers and teams that need a capable test framework without seat fees or usage charges. There are no cheaper tiers to trade features against, and no paid plan is presented for organisations seeking a different service level. Help is directed to the Vitest Discord community and GitHub Discussions.
Platforms
Vitest supports Linux, macOS, Windows and the web. Its browser-based StackBlitz option is useful for a quick evaluation, while local projects should account for the Vite and Node minimum versions before standardising on it.
Who it's for
Choose Vitest when your application already uses Vite and you want tests to share its configuration and transformation pipeline. It also suits JavaScript and TypeScript teams that need one free framework spanning unit-style tests, browser runs, component testing, coverage and benchmarking, or Jest teams looking for compatible APIs.
Look elsewhere if upgrading to Vite 6.4.0 and Node 22.12.0 is not practical, or if your priority is a testing approach that does not align with Vite-oriented tooling and its surrounding ecosystem.
Pros and cons
Pros
- Deep Vite reuse: configuration, plugins, resolvers and transforms can be shared, reducing divergence between application and test environments.
- Broad test scope: browser, component, coverage and benchmarking capabilities sit alongside core test patterns.
- Migration-friendly APIs: Jest-compatible assertions, snapshots and mocks give experienced Jest users a familiar starting point.
- No licence cost: the open-source plan is free with no stated plan limits.
Cons
- Recent runtime baseline: Vite 6.4.0 or later and Node 22.12.0 or later are required, excluding older project environments until they upgrade.
- Compatibility is not identical migration: Jest-style APIs help, but existing suites may still require changes.
- No stated commercial tier: organisations seeking a separately defined enterprise plan or service terms have no such option presented here.
Alternatives
Karma is worth considering when you need a free, MIT-licensed runner across mobile, desktop, web and self-hosted environments, but it is deprecated and receives no new features or general bug fixes.
Web Test Runner is a free open-source option for teams focused on modern web development and close browser collaboration.
QUnit suits readers wanting a free open-source JavaScript framework distributed through CDN, npm and Yarn, with broad platform coverage.
Cucumber.js is a free npm-module choice when installing a development dependency is the preferred workflow.
Pure Test is a free Apache-2.0 open-source option with no paid plans stated.
Testem is a free MIT-licensed JavaScript test runner for Linux, macOS and Windows.
Jasmine is a free option for Linux, macOS, web and Windows, with no pricing or usage limits stated.
Rstest is a free, MIT-licensed JavaScript/TypeScript framework available as an extension and for the web.
For broader comparisons, see JavaScript Testing Frameworks and Unit Testing Frameworks.
Verdict
Vitest is an excellent fit for Vite-based JavaScript and TypeScript teams that want a free framework with Jest-familiar APIs and unusually wide coverage of browser, component and performance testing. Choose it primarily for the way it reuses Vite's setup; look elsewhere when your project cannot meet its current Vite and Node requirements or needs a separately defined commercial offering.
The verdict
Vitest offers Vite integration alongside browser, component, coverage and benchmarking capabilities. Check its Vite and Node requirements before adopting it.
Questions people ask
Is Vitest free?
Yes. Vitest is listed as free and open source, with a free plan.
Which platforms does Vitest support?
Its listed platforms are Linux, macOS, web and Windows.
Can Vitest replace Jest?
Vitest provides Jest-compatible APIs for assertions, snapshots and mocking, which can support migration from Jest.
Does Vitest test in browsers?
Browser Mode runs tests natively in a browser and supports Playwright and WebdriverIO providers.
What languages does Vitest support?
Its supported languages include JavaScript and TypeScript, with out-of-the-box support for TypeScript, JSX and ES modules.
What the maker publishes
- Benchmarking
- Vitest lists benchmarking support powered by Tinybench. source
- Browser testing
- Browser Mode runs tests natively in a browser and supports Playwright and WebdriverIO providers. source
- Component testing
- The features guide lists component testing for Vue, React, Svelte, Lit, Marko, and other frameworks. source
- Coverage
- Vitest supports code coverage through V8 or Istanbul. source
- IDE integration
- The getting started guide says Vitest provides an official Visual Studio Code extension. source
- Jest compatibility
- Vitest offers Jest-compatible APIs for assertions, snapshots, and mocking to support migration from Jest. source
- Languages
- Vitest provides out-of-the-box support for TypeScript, JSX, and ES modules. source
- Maintainer
- VoidZero's About page identifies Evan You as Founder and CEO. source
- Product
- Vitest is a Vite-powered testing framework. source
- Requirements
- The getting started guide says Vitest requires Vite 6.4.0 or later and Node 22.12.0 or later. source
- Security
- The maker's announcement says it plans an enterprise JavaScript tooling solution designed for scale and security requirements; it does not state a Vitest security certification. source
- Support
- The guide directs users needing help to the Vitest Discord community and GitHub Discussions. source
- Try online
- Vitest can be tried in the browser through StackBlitz without installing it locally. source
- Vite integration
- Vitest can reuse Vite configuration, plugins, resolvers, and transform pipelines, and can also run without Vite. source
- Watch mode
- Watch mode reruns tests related to changed source or test files. source
Checked against the maker's pages on 30 Sept 2026.