Karol Stawowski cdfdb20cfa
docs: add bench command to cli documentation (#2948)
Co-authored-by: Ari Perkkiö <ari.perkkio@gmail.com>
2023-03-07 18:25:10 +01:00
2023-02-11 16:53:41 +01:00
2022-11-21 16:50:58 +01:00
2021-12-12 09:02:05 +08:00
2022-08-02 08:26:26 +03:00
2023-02-28 16:13:18 +01:00
2023-02-28 14:56:55 +01:00
2023-01-12 13:07:46 +01:00

Vitest

A blazing fast unit test framework powered by Vite.

Get involved!

Documentation | Getting Started | Examples | Why Vitest?

中文文档



Features

Vitest requires Vite >=v3.0.0 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

Vladimir 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%