Skip to content

Latest commit

 

History

History
114 lines (87 loc) · 3.74 KB

README.md

File metadata and controls

114 lines (87 loc) · 3.74 KB

Vitest

A blazing fast unit test framework powered by Vite.



⚠️ 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 v14

Follow the Getting Started Guide or learn why we are building a new test runner.

Documentation

Read the documentation.

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

Anthony Fu Sponsors

Patak Sponsors

Credits

Thanks to:

License

MIT License © 2021-Present Anthony Fu, Matias Capeletto