Skip to content

vitest-dev/vitest

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

193272e · Dec 1, 2024
Nov 19, 2024
Oct 7, 2024
Dec 1, 2024
Oct 23, 2024
Dec 1, 2024
Jun 24, 2024
Sep 6, 2024
Dec 1, 2024
Jan 27, 2022
Aug 3, 2023
Dec 1, 2024
Feb 17, 2024
Nov 10, 2023
Dec 10, 2021
Oct 17, 2024
Feb 14, 2024
Feb 20, 2024
Oct 3, 2024
Oct 23, 2024
Nov 27, 2024
Nov 18, 2024
Dec 1, 2024
Jan 17, 2024
Aug 4, 2022
Nov 18, 2024
Jun 24, 2024
Oct 11, 2024

Repository files navigation

Vitest

Next generation testing framework powered by Vite.

Get involved!

Documentation | Getting Started | Examples | Why Vitest?

中文文档



Features

Vitest requires Vite >=v5.0.0 and Node >=v18.0.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

Vladimir Sponsors

Anthony Fu Sponsors

Patak Sponsors

Credits

Thanks to:

Contribution

See Contributing Guide.

License

MIT License © 2021-Present Anthony Fu, Matias Capeletto