vitest

v2026.09.24

Use for Vitest in TypeScript projects (Node, bun, React/Next.js, Effect): write, run, or debug unit/component tests, mocks, testing utilities, and coverage.

GitHub
安装命令
npx skhub add paulrberg/vitest
Markdown
SKILL.md

Vitest

Repository configuration, projects, setup, imports/globals, environments, aliases, test placement, and cleanup own the test contract. Inspect them and nearby tests before adding generic patterns. Do not add globals, jsdom, coverage, new setup, or browser mode by default.

Workflow

Define the behavior or regression, test its observable public result, and mock system boundaries rather than the behavior under test. Follow local fixture and cleanup ownership. In Effect repositories, use established @effect/vitest conventions such as it.effect, Layers, and TestClock rather than generic replacements. For a bug fix, reproduce the failure before relying on a passing result when practical.

Read patterns for component, async, fixture, snapshot, tag, or browser questions; mocking for module, timer, spy, or global boundaries; configuration for projects, migration, coverage, or reporter selection; and troubleshooting for hangs, discovery, resolution, or flaky state.

Run the narrowest established command for the changed behavior, then the affected package suite only when shared setup or contracts changed. Use nlx vitest run only when no project recipe or script exists. Completion requires a meaningful passing focused test under repository configuration and concise command/result evidence. Use ### 🧪 Regression covered when red-before-green evidence exists; otherwise ### 🧪 Tests verified.

发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

2026年9月24日

分类

未分类

许可证

MIT

源路径

skills/vitest

默认分支

main

最新提交

ce348a5

Tree SHA

fb79614