[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

6.0k 40 50

Clone this repository

https://tangled.org/vitest.dev/vitest https://tangled.org/did:plc:dbizd3j2tn4hzdwq7ustggg6
git@tangled.org:vitest.dev/vitest git@tangled.org:did:plc:dbizd3j2tn4hzdwq7ustggg6

For self-hosted knots, clone URLs may differ based on your setup.



README.md



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