Agent Skills
› UsefulSoftwareCo/executor
› wrdn-effect-vitest-tests
wrdn-effect-vitest-tests
GitHub规范仓库内测试代码,强制使用@effect/vitest替代原生vitest导入。禁止在条件分支中使用expect,需拆分测试或显式断言,确保测试确定性与Effect兼容性。
Trigger Scenarios
lint提示vitest导入问题
测试中存在条件断言
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


