# W Unit

> Add unit tests for the current change using the repo test skill and colocated files.

- Skill: `blockmatic/w-unit` (Agent Skill)
- Install (CLI): `npx get-skill add blockmatic/w-unit`
- Raw SKILL.md: https://api.skillmd.com/api/skills/blockmatic/w-unit/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: blockmatic (https://skillmd.com/u/blockmatic)
- Updated: 2026-11-11
- Page: https://skillmd.com/skills/blockmatic/w-unit

---


Cover the requested behavior with unit tests. Follow `vitest-v5` (or the stack's test skill) and existing file conventions. Do not chase coverage percentage.

1. Read neighboring tests and the test skill. Colocate `*.test.ts` beside the implementation.
2. Test the behavior that can fail: public API, error paths, and the regression this change needs.
3. Mock only at documented boundaries. Prefer real types and factories the repo already uses.
4. Run the focused file, then the package test script.
5. Docs: `/w-docs` if behavior or commands changed.

