Import describe, it, expect, and helpers from @effect/vitest.
Import utility helpers from @effect/vitest/utils when needed.
Do not import from raw vitest except in config or tooling files.
Do not put expect(...) behind if, 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" });
1---2name: wrdn-effect-vitest-tests-23description: Keep tests deterministic and Effect-aware. Use when lint flags direct vitest imports or conditional assertions inside tests.4---56Use `@effect/vitest` for tests in this repo.78## Fix Shape910- Import `describe`, `it`, `expect`, and helpers from `@effect/vitest`.11- Import utility helpers from `@effect/vitest/utils` when needed.12- Do not import from raw `vitest` except in config or tooling files.13- Do not put `expect(...)` behind `if`, ternary, logical, or switch branches.14- Split conditional behavior into separate tests, or assert the branch condition and expected value explicitly.1516## Bad1718```ts19if (result.ok) {20 expect(result.value).toBe("x");21}22```2324## Good2526```ts27expect(result).toEqual({ ok: true, value: "x" });28```
Run npx get-skill add usefulsoftwareco/wrdn-effect-vitest-tests-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Keep tests deterministic and Effect-aware. Use when lint flags direct vitest imports or conditional assertions inside tests. It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
usefulsoftwareco (@usefulsoftwareco) published this skill. Their other Agent Skills are listed on their SkillMD profile.