Skip to content

vitest-dev/vitest

Folders and files

NameName
Last commit message
Last commit date
Jan 16, 2025
Jan 3, 2025
Jan 20, 2025
Jan 15, 2025
Jan 20, 2025
Dec 31, 2024
Sep 6, 2024
Jan 17, 2025
Jan 27, 2022
Aug 3, 2023
Jan 12, 2025
Feb 17, 2024
Nov 10, 2023
Dec 10, 2021
Oct 17, 2024
Feb 14, 2024
Feb 20, 2024
Dec 9, 2024
Dec 19, 2024
Jan 14, 2025
Jan 17, 2025
Jan 16, 2025
Jan 17, 2024
Aug 4, 2022
Jan 12, 2025
Jan 12, 2025
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