Discover / Development

Vitest

by vitest-devTypeScript

Blazing-fast unit test framework powered by Vite.

Repositorystable

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 matched

No 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 confidence

A 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

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

Ships CLAUDE.mdHas testsHas docsHas examplesSecurity policyCI configured

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] &nbsp;-&nbsp; 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] &nbsp;-&nbsp; by @SveLil and @hi-ogawa in https://github.com/vitest-dev/vitest/issues/10661 <samp>(bae52)</samp>
&nbsp;&nbsp;&nbsp;&nbsp;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

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:

Contribution

See Contributing Guide.

License

MIT License © 2021-Present VoidZero Inc. and Vitest contributors

Related tools