vitest-dev/vitest

Public

Next generation testing framework powered by Vite.

  • Stars17.3k+22 tuần này
  • Forks2.1k
  • Watchers58
  • Issues346
  • Ngày tạo04/12/2021
  • Cập nhật gần nhất27/10/2026
  • Ngôn ngữTypeScript
  • Giấy phépMIT
README.md11.6 KBRaw



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

Nội dung README thuộc về vitest-dev và cộng đồng đóng góp, giấy phép MIT. Nguồn: github.com/vitest-dev/vitest