Home

Awesome

<p align="center"> <a href="https://vitest.dev"> <img src="https://user-images.githubusercontent.com/11247099/145112184-a9ff6727-661c-439d-9ada-963124a281f7.png" height="150"> </a> </p> <h1 align="center"> Vitest </h1> <p align="center"> Next generation testing framework powered by Vite. <p> <p align="center"> <a href="https://www.npmjs.com/package/vitest"><img src="https://img.shields.io/npm/v/vitest?color=729B1B&label="></a> <p> <p align="center"> <a href="https://chat.vitest.dev"><b>Get involved!</b></a> </p> <p align="center"> <a href="https://vitest.dev">Documentation</a> | <a href="https://vitest.dev/guide/">Getting Started</a> | <a href="https://vitest.dev/guide/#examples">Examples</a> | <a href="https://vitest.dev/guide/why">Why Vitest?</a> </p> <p align="center"> <a href="https://cn.vitest.dev">中文文档</a> </p> <h4 align="center"> </h4> <br> <br>

Features

Vitest requires Vite >=v5.0.0 and Node >=v18.0.0

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

Vladimir Sponsors

<p align="center"> <a href="https://cdn.jsdelivr.net/gh/sheremet-va/static/sponsors.svg"> <img src='https://cdn.jsdelivr.net/gh/sheremet-va/static/sponsors.svg'/> </a> </p>

Anthony Fu Sponsors

<p align="center"> <a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg"> <img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/> </a> </p>

Patak Sponsors

<p align="center"> <a href="https://cdn.jsdelivr.net/gh/patak-dev/static/sponsors.svg"> <img src='https://cdn.jsdelivr.net/gh/patak-dev/static/sponsors.svg'/> </a> </p>

Credits

Thanks to:

Contribution

See Contributing Guide.

License

MIT License © 2021-Present Anthony Fu, Matias Capeletto