2022-03-27 16:28:25 +08:00
2022-02-23 22:31:50 +08:00
2022-03-27 16:11:14 +08:00
2022-03-25 14:58:18 +08:00
2022-02-22 13:17:20 +08:00
2021-12-12 09:02:05 +08:00
2022-03-25 15:06:22 +08:00
2022-01-04 01:33:51 +08:00
2022-03-27 16:28:25 +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

S
Description
Next generation testing framework powered by Vite.
Readme MIT
67 MiB
Languages
TypeScript 95.5%
Vue 2.6%
JavaScript 1.7%
CSS 0.1%