2022-07-31 13:49:22 +03:00
2022-05-08 15:34:05 +08:00
2022-08-15 14:04:41 +08:00
2022-08-15 17:32:20 +08:00
2021-12-12 09:02:05 +08:00
2022-08-02 08:26:26 +03:00
2022-09-06 15:19:11 +08:00

Vitest

A blazing fast unit test framework powered by Vite.

Get involved!

Documentation | Getting Started | Examples | Why Vitest?

中文文档



Features

Vitest requires Vite >=v2.7.10 and Node >=v14

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

Patak Sponsors

Credits

Thanks to:

Contribution

See Contributing Guide.

License

MIT License © 2021-Present Anthony Fu, Matias Capeletto

Description
A Vite-native test framework. It's fast!
Readme MIT 149 MiB
Languages
TypeScript 94.4%
Vue 3.2%
JavaScript 2.2%
CSS 0.1%
HTML 0.1%