unit-test-writerlisted
Install: claude install-skill dayvisonassis/sdd-skills
# Unit Test Writer (PABX)
Plan and implement fast, isolated, high-quality **unit tests** for the PABX monorepo. Validates
logic without hitting real databases, HTTP, or filesystems. **Never modifies production code** —
if a test fails, only the test is adjusted.
> **Project scope:** this skill assumes the **PABX monorepo** structure. All the hard,
> project-specific rules (jQuery/localStorage mock order, `Promise.all()` mock pattern, file
> locations, execution commands) are in **`references/pabx-rules.md`** — read it before writing.
> Generic SDD flow docs: `https://github.com/dayvisonassis/sdd-skills/blob/main/docs/GUIA_DO_WORKFLOW.md`.
**Scope:**
- **Frontend:** `apps/frontend/` — Jest + jest-preset-angular, `*.spec.ts` co-located with the source.
- **Backend:** `apps/backend/__tests__/unit/` — Jest, `*.test.js` mirroring `src/` (1:1).
## INPUT
- `target_file` (required) — the source file to test.
- `mode` (optional) — `interactive` (default when a user calls directly) or `autonomous` (set by implement-feature/evaluator).
- `test_file_path` (optional) — existing test file to expand; otherwise created automatically.
- `focus_areas` / `batch_size` (optional) — prioritized methods; tests per batch (default 8, 5–10).
- `test_catalog_path` (optional) — a Test Catalog entry to accelerate Phase 1.
- `evaluation_report` (optional) — when present, run in **correction mode** (fix only the failing test named in the report).
## OUTPUT
- New/expanded `.spec.ts` / `.test.js` unit