TypeScript MIT

vitest

Next generation testing framework powered by Vite.

V

vitest-dev

Dernière activité 29 sept. 2026
vitest-dev/vitest

17,2 k

étoiles

2 k

forks

431

issues ouvertes

testtesting-toolsvite

Ce README est souvent en anglais.



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

Projets similaires

Next generation frontend tooling. It's fast!

TypeScriptbuild-tooldev-serverfrontend
Vvitejs
83,1 k étoiles8,8 k

Delightful JavaScript Testing.

TypeScripteasyexpectationfacebook
Jjestjs
45,5 k étoiles6,7 k

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

TypeScriptautomationchromechromium
Mmicrosoft
96,9 k étoiles6,5 k