# Wrdn Effect Vitest Tests

> Keep tests deterministic and Effect-aware. Use when lint flags direct vitest imports or conditional assertions inside tests.

- Skill: `usefulsoftwareco/wrdn-effect-vitest-tests` (Agent Skill)
- Install (CLI): `npx skillmds@latest add usefulsoftwareco/wrdn-effect-vitest-tests`
- Raw SKILL.md: https://api.skillmd.com/api/skills/usefulsoftwareco/wrdn-effect-vitest-tests/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: usefulsoftwareco (https://skillmd.com/u/usefulsoftwareco)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/usefulsoftwareco/wrdn-effect-vitest-tests

---


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/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

```ts
if (result.ok) {
  expect(result.value).toBe("x");
}
```

## Good

```ts
expect(result).toEqual({ ok: true, value: "x" });
```

