ZOYKUHot Board

vitest-dev/vitest기술 문서

vitest-dev/vitest open-source repository on GitHub

목차 (TOC) (5개 섹션)▾
언어 대체 안내:해당 저장소의 한국어 문서가 제공되지 않아 공식 영문 원본(English)으로 표시됩니다.
npm i 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

GitHub 공식 원본 저장소에서 아카이브된 문서 미러 · GitHub 저장소 방문
동기화 기준일: 2026-11-07