2021-12-13 11:17:34 +01:00
2021-12-12 21:03:22 +08:00
2021-12-05 17:25:34 +08:00
2021-12-13 17:32:42 +08:00
2021-12-13 16:47:43 +08:00
2021-12-12 08:22:17 +08:00
2021-12-04 00:05:46 +08:00
2021-12-04 00:05:46 +08:00
2021-12-12 09:02:05 +08:00
2021-12-12 18:28:24 +08:00
2021-12-13 16:49:39 +08:00
2021-12-13 16:47:43 +08:00
2021-12-07 23:32:40 +08:00
2021-12-13 02:59:02 +08:00
2021-12-13 16:47:43 +08:00

Vitest

A blazing fast unit test framework powered by Vite.

Open the Docs

Get involved!



💖 This project is currently in closed beta exclusively for Sponsors.
Become a Sponsor of @patak-dev or @antfu to access the source code and issues tracker.

⚠️ DISCLAIMER: Vitest is still in development and not stable yet. It's not recommended to use it in production.

Vitest requires Vite v2.7 and Node v16

Switch to Vitest by following the Getting Started Guide or learn why we are building a new test runner.

Features

import { it, describe, expect, assert } 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

Examples

Projects using Vitest

Sponsors

Credits

Thanks to:

  • @patak-dev for the awesome package name!
  • The Vite team for brainstorming the initial idea.
  • @pi0 for the idea and implementation of using Vite to transform and bundle the server code.
  • @lukeed for the work on uvu where we are inspired a lot from.

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%