Agent Skills
› UsefulSoftwareCo/executor
› wrdn-effect-vitest-tests
wrdn-effect-vitest-tests
GitHub规范仓库内测试代码,强制使用@effect/vitest替代原生vitest导入。禁止在条件分支中嵌套断言,要求拆分测试或显式断言条件与值,确保测试确定性且兼容Effect框架。
Trigger Scenarios
代码审查中发现使用了原生 vitest 导入
测试代码中包含 if/ternary/logical/switch 包裹的 expect 调用
Install
npx skills add UsefulSoftwareCo/executor --skill wrdn-effect-vitest-tests -g -y
SKILL.md
Frontmatter
{
"name": "wrdn-effect-vitest-tests",
"description": "Keep tests deterministic and Effect-aware. Use when lint flags direct vitest imports or conditional assertions inside tests.",
"allowed-tools": "Read Grep Glob Bash"
}
Use @effect/vitest for tests in this repo.
Fix Shape
- Import
describe,it,expect, and helpers from@effect/vitest. - Import utility helpers from
@effect/vitest/utilswhen needed. - Do not import from raw
vitestexcept in config or tooling files. - Do not put
expect(...)behindif, ternary, logical, or switch branches. - Split conditional behavior into separate tests, or assert the branch condition and expected value explicitly.
Bad
if (result.ok) {
expect(result.value).toBe("x");
}
Good
expect(result).toEqual({ ok: true, value: "x" });
Version History
- fd4fb02 Current 2026-07-05 10:55


