Discover / Development
Vitest
by vitest-devTypeScript
Blazing-fast unit test framework powered by Vite.
Maturity: stable because 5y old, v4.1.10 released 28d ago. Derived from release and commit history, not a rating.
- Stars
- 17k
- Forks
- 1.9k
- Downloads / mo
- —
- Last commit
- 2026-08-03
- License
- MIT
- Open issues
- 400
Market and trust evidence
Edition not yet matchedNo exact skills.sh identity match is available for this repository. Repository adoption and freshness remain visible above; install momentum is not inferred.
Trust analysis is a screening signal, not a security warranty. Read the ranking and trust methodology.
In practice
Written by AI from this repository’s README · high confidenceA separate test runner needs its own transform pipeline, which drifts from the build setup the app already uses.
Use it when
When your project already uses Vite and you want fast tests with Jest compatible assertions and mocking.
Not the right pick when
Requires Vite 6.4.0 or newer and Node 22.12.0 or newer, so older toolchains are out of scope.
Capabilities
- reuses Vite config, transformers, resolvers and plugins
- Jest snapshot testing with Jest expect compatible assertions
- smart and instant watch mode
- native code coverage via v8 or istanbul
- JSDOM and happy-dom plus Browser Mode for component tests
- out of the box TypeScript and JSX support
Requirements
- Vite >=v6.4.0
- Node >=v22.12.0
Cost: Free and open source
Video walkthroughs
React Vite Testing Tutorial For Beginners - Vitest Testing Crash Course
Ari Perkkiö | Getting Started with Vitest Code Coverage | ViteConf 2024
Third-party YouTube uploads matched to this tool by title, channel and repository name on 2026-08-03. Not made, reviewed or endorsed by SkillPilot. View counts and publish months are as of the match date and the month is approximate. Nothing loads from YouTube until you press play.
What the repository ships
Detected from the actual files in the repository root.
Latest release v4.1.10
Published 2026-07-06
🐞 Bug Fixes
- browser: Check fs access in builtin commands [backport to v4] - by @hi-ogawa, Hiroshi Ogawa and OpenCode (claude-opus-4-8) in https://github.com/vitest-dev/vitest/issues/10680 <samp>(5c18d)</samp>
- vm: Fix external module resolve error with deps optimizer query for encoded URI [backport to v4] - by @SveLil and @hi-ogawa in https://github.com/vitest-dev/vitest/issues/10661 <samp>(bae52)</samp>
View changes on GitHub
Tags
README
<p align="center">
<br>
<br>
<a href="https://vitest.dev" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://vitest.dev/vitest-light.svg">
<source media="(prefers-color-scheme: light)" srcset="https://vitest.dev/vitest-dark.svg">
<img alt="Vitest logo" src="https://vitest.dev/vitest-dark.svg" height="60">
</picture>
</a>
<br>
<br>
<br>
</p>
<h1 align="center">
Vitest
</h1>
<p align="center">
Next generation testing framework powered by Vite.
<p>
<p align="center">
<a href="https://npmx.dev/package/vitest"><img src="https://img.shields.io/npm/v/vitest?color=729B1B&label=" alt="current vitest version badge"></a>
<p>
<p align="center">
<a href="https://chat.vitest.dev"><b>Get involved!</b></a>
</p>
<p align="center">
<a href="https://vitest.dev">Documentation</a> | <a href="https://vitest.dev/guide/">Getting Started</a> | <a href="https://vitest.dev/guide/#examples">Examples</a> | <a href="https://vitest.dev/guide/why">Why Vitest?</a>
</p>
<p align="center">
<a href="https://cn.vitest.dev">中文文档</a>
</p>
<h4 align="center">
</h4>
<br>
<br>
Features
- Vite's config, transformers, resolvers, and plugins. Use the same setup from your app!
- Jest Snapshot
- Chai built-in for assertions, with Jest expect compatible APIs
- Smart & instant watch mode, like HMR for tests!
- Native code coverage via
v8oristanbul. - Jest-compatible mocking, stubbing, and spies.
- JSDOM and happy-dom for DOM and browser API mocking
- Browser Mode for running component tests in the browser
- Components testing (Vue, React, Svelte, Lit, Marko)
- Benchmarking support with Tinybench
- Projects support
- expect-type for type-level testing
- ESM first, top level await
- Out-of-box TypeScript / JSX support
- Filtering, timeouts, concurrent for suite and tests
- Sharding support
- Reporting Uncaught Errors
- Run your tests in the browser natively
Vitest requires Vite >=v6.4.0 and Node >=v22.12.0
import { assert, describe, expect, it } from 'vitest'
describe('suite name', () => {
it('foo', () => {
expect(1 + 1).toEqual(2)
expect(true).to.be.true
})
it('bar', () => {
assert.equal(Math.sqrt(4), 2)
})
it('snapshot', () => {
expect({ foo: 'bar' }).toMatchSnapshot()
})
})
$ npx vitest
Sponsors
<p align="center">
<a href="https://cdn.jsdelivr.net/gh/sheremet-va/static/vitest/sponsors.svg">
<img src='https://cdn.jsdelivr.net/gh/sheremet-va/static/vitest/sponsors.svg' alt="vitest's sponsors"/>
</a>
</p>
Credits
Thanks to:
- The Jest team and community for creating a delightful testing API
- @lukeed for the work on uvu where we are inspired a lot from.
- @pi0 for the idea and implementation of using Vite to transform and bundle the server code.
- The Vite team for brainstorming the initial idea.
- @patak-dev for the awesome package name!
Contribution
See Contributing Guide.
License
MIT License © 2021-Present VoidZero Inc. and Vitest contributors