PuruVJ / vitest

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

Home Page:https://vitest.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vitest

A blazing fast unit test framework powered by Vite.

Get involved!



Vitest requires Vite >=v2.7.10 and Node >=v14

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

Documentation

Read the documentation.

Examples | Projects using Vitest

Features

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

Patak Sponsors

Credits

Thanks to:

Contribution

See Contributing Guide.

License

MIT License © 2021-Present Anthony Fu, Matias Capeletto

About

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

https://vitest.dev

License:MIT License


Languages

Language:TypeScript 87.2%Language:Vue 8.6%Language:JavaScript 3.1%Language:CSS 0.9%Language:HTML 0.2%