• Stars
    star
    12,866
  • Rank 2,476 (Top 0.05 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 3 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Next generation testing framework powered by Vite.

Vitest

Next generation testing framework powered by Vite.

Get involved!

Documentation | Getting Started | Examples | Why Vitest?

δΈ­ζ–‡ζ–‡ζ‘£



Features

Vitest requires Vite >=v3.0.0 and Node >=v14.18

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

Anthony Fu Sponsors

Vladimir Sponsors

Patak Sponsors

Credits

Thanks to:

Contribution

See Contributing Guide.

License

MIT License Β© 2021-Present Anthony Fu, Matias Capeletto