Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
Something went wrong. Try again.
TypeScript
12345678910111213141516import { assert, describe, expect, it } from 'vitest'
describe('suite name', () => { it('foo', () => { assert.equal(Math.sqrt(4), 2) })
it('bar', () => { expect(1 + 1).eq(2) })
it('snapshot', () => { expect({ foo: 'bar' }).toMatchSnapshot() })})