vitest by antfu/skills
npx skills add https://github.com/antfu/skills --skill vitestVitest 是一个由 Vite 驱动的下一代测试框架。它提供了与 Jest 兼容的 API,并原生支持 ESM、TypeScript 和 JSX。Vitest 与您的 Vite 应用共享相同的配置、转换器、解析器和插件。
主要特性:
此技能基于 Vitest 3.x,生成于 2026-01-28。
| 主题 | 描述 | 参考链接 |
|---|---|---|
| 配置 | Vitest 与 Vite 配置集成,defineConfig 用法 | core-config |
| 命令行界面 | 命令行接口,命令和选项 | core-cli |
| 测试 API | test/it 函数,skip、only、concurrent 等修饰符 | core-test-api |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 描述 API | describe/suite 用于分组测试和嵌套套件 | core-describe |
| 期望 API | 使用 toBe、toEqual、匹配器和非对称匹配器进行断言 | core-expect |
| 钩子 | beforeEach、afterEach、beforeAll、afterAll、aroundEach | core-hooks |
| 主题 | 描述 | 参考链接 |
|---|---|---|
| 模拟 | 使用 vi 工具模拟函数、模块、计时器、日期 | features-mocking |
| 快照 | 使用 toMatchSnapshot 和内联快照进行快照测试 | features-snapshots |
| 覆盖率 | 使用 V8 或 Istanbul 提供程序的代码覆盖率 | features-coverage |
| 测试上下文 | 测试夹具,context.expect,test.extend 用于自定义夹具 | features-context |
| 并发 | 并发测试,并行执行,分片 | features-concurrency |
| 过滤 | 按名称、文件模式、标签过滤测试 | features-filtering |
| 主题 | 描述 | 参考链接 |
|---|---|---|
| Vi 工具 | vi 辅助工具:mock、spyOn、模拟计时器、hoisted、waitFor | advanced-vi |
| 环境 | 测试环境:node、jsdom、happy-dom、自定义 | advanced-environments |
| 类型测试 | 使用 expectTypeOf 和 assertType 进行类型级别测试 | advanced-type-testing |
| 项目 | 多项目工作区,每个项目不同的配置 | advanced-projects |
每周安装量
8.0K
仓库
GitHub 星标
3.9K
首次出现
Jan 28, 2026
安全审计
安装于
opencode5.9K
codex5.8K
gemini-cli5.6K
github-copilot5.5K
cursor5.2K
kimi-cli4.7K
Vitest is a next-generation testing framework powered by Vite. It provides a Jest-compatible API with native ESM, TypeScript, and JSX support out of the box. Vitest shares the same config, transformers, resolvers, and plugins with your Vite app.
Key Features:
The skill is based on Vitest 3.x, generated at 2026-01-28.
| Topic | Description | Reference |
|---|---|---|
| Configuration | Vitest and Vite config integration, defineConfig usage | core-config |
| CLI | Command line interface, commands and options | core-cli |
| Test API | test/it function, modifiers like skip, only, concurrent | core-test-api |
| Describe API | describe/suite for grouping tests and nested suites | core-describe |
| Expect API | Assertions with toBe, toEqual, matchers and asymmetric matchers | core-expect |
| Hooks | beforeEach, afterEach, beforeAll, afterAll, aroundEach | core-hooks |
| Topic | Description | Reference |
|---|---|---|
| Mocking | Mock functions, modules, timers, dates with vi utilities | features-mocking |
| Snapshots | Snapshot testing with toMatchSnapshot and inline snapshots | features-snapshots |
| Coverage | Code coverage with V8 or Istanbul providers | features-coverage |
| Test Context | Test fixtures, context.expect, test.extend for custom fixtures | features-context |
| Concurrency | Concurrent tests, parallel execution, sharding | features-concurrency |
| Filtering | Filter tests by name, file patterns, tags |
| Topic | Description | Reference |
|---|---|---|
| Vi Utilities | vi helper: mock, spyOn, fake timers, hoisted, waitFor | advanced-vi |
| Environments | Test environments: node, jsdom, happy-dom, custom | advanced-environments |
| Type Testing | Type-level testing with expectTypeOf and assertType | advanced-type-testing |
| Projects | Multi-project workspaces, different configs per project | advanced-projects |
Weekly Installs
8.0K
Repository
GitHub Stars
3.9K
First Seen
Jan 28, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode5.9K
codex5.8K
gemini-cli5.6K
github-copilot5.5K
cursor5.2K
kimi-cli4.7K
97,400 周安装
| features-filtering |