Skip to content
项目

关于

由 Vite 驱动的新一代测试框架。

开发工具

这些数字如何统计

可以做什么

  • Vite's config, transformers, resolvers, and plugins. Use the same setup from your app!
  • Chai built-in for assertions, with Jest expect compatible APIs
  • Smart & instant watch mode, like HMR for tests!
  • Native code coverage via v8 or istanbul.

实测星标增长

24小时
+24
7天
+155
15天
+245
1个月
+325

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文



Vitest logo


Vitest

Next generation testing framework powered by Vite.

current vitest version badge

Get involved!

Documentation | Getting Started | Examples | Why Vitest?

中文文档



Features

Vitest requires Vite >=v6.4.0 and Node >=v22.12.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

vitest's sponsors

Credits

Thanks to:

Contribution

See Contributing Guide.

License

MIT License © 2021-Present VoidZero Inc. and Vitest contributors

探索相关项目

加载中…