Skip to content
/ vitest Public
forked from vitest-dev/vitest

A Vite-native test framework. It's fast!

License

Notifications You must be signed in to change notification settings

so11y/vitest

 
 

Repository files navigation

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

About

A Vite-native test framework. It's fast!

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 94.1%
  • JavaScript 3.1%
  • Vue 1.7%
  • Other 1.1%