# Write Test

> Generate unit tests with edge case and error coverage

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

---


Write thorough unit tests for the specified code. Follow the project's existing test framework and conventions.

Use the Arrange-Act-Assert pattern. Name tests descriptively: `should_[behavior]_when_[condition]`.

Cover:
- Happy path for each public method
- Null/empty/boundary inputs
- Error and exception handling
- Edge cases specific to the business logic

Mock external dependencies. Use specific assertions. Ensure each test is independent and idempotent.

