stackpicks.dev
Back to gallery
vitest-dev/vitest preview
vitest-dev
vitest-dev/

vitest

Next generation testing framework powered by Vite.

Stars
16.6k
Forks
1.8k
Watchers
16.6k
Open issues
405
TypeScriptMIT main Updated 30 minutes ago~10 stars/day lifetime
Editor's take

Vite-native unit test runner. ~13k stars. Faster than Jest, compatible API. Default for new Vite-based projects in 2026.

Use this if

You are starting a new project on Vite or modernizing from Jest.

Skip if

You are deep in a Jest codebase and migration cost is high — Jest still works.

Testing
Topics
testtesting-toolsvite
Quick install
# Install via npm / pnpm / bun:
pnpm add vitest
# or
npm install vitest

Inferred from TypeScript · always double-check against the official README below.

README — rendered from vitest-dev/vitest



Vitest logo


Vitest

Next generation testing framework powered by Vite.

current vitest version badge

Get involved!

Documentation | Getting Started | Examples | Why Vitest?

中文文档



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

vitest's sponsors

Credits

Thanks to:

Contribution

See Contributing Guide.

License

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

Live data via GitHub REST API · Cached 30 min · Created 04 Dec 2021