2021-12-04 21:06:05 +08:00
2021-12-04 04:33:15 +08:00
2021-12-04 06:39:06 +08:00
2021-12-04 21:06:05 +08:00
2021-12-04 21:06:05 +08:00
2021-12-04 00:05:46 +08:00
2021-12-04 00:05:46 +08:00
2021-12-04 00:05:46 +08:00
2021-12-04 00:05:46 +08:00
2021-12-04 00:05:46 +08:00
2021-12-04 07:44:57 +08:00
2021-12-04 07:44:57 +08:00
2021-12-04 00:05:46 +08:00
2021-12-04 04:29:06 +08:00
2021-12-04 04:29:06 +08:00
2021-12-04 06:31:10 +08:00

vitest

NPM version

A blazing fast test runner powered by Vite.

Features

  • Vite's transformer, resolver, and plugin system. Powered by vite-node.
  • Jest Snapshot.
  • Chai for assertions.
  • Async suite / test.
  • ESM friendly, top level await.
import { it, describe, expect, assert } from 'vitest'

describe('suite name', () => {
  it('foo', () => {
    assert.equal(Math.sqrt(4), 2)
  })

  it('bar', () => {
    expect(1 + 1).eq(2)
  })

  it('snapshot', () => {
    expect({ foo: 'bar' }).toMatchSnapshot()
  })
})
$ npx vitest

TODO

  • Reporter & Better output
  • CLI Help
  • Task filter
  • Mock
  • JSDom
  • Watch
  • Coverage

Sponsors

License

MIT License © 2021 Anthony Fu

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%