← ClaudeAtlas

unit-test-writerlisted

Plans and implements comprehensive unit tests for the PABX monorepo — Angular frontend (Jest + jest-preset-angular, .spec.ts) and Node.js backend (Jest, apps/backend/__tests__/unit/). Runs interactively (3 phases with an approval checkpoint) when called by a user, or autonomously (no pause) when dispatched by implement-feature/evaluator. Also runs in correction mode to fix a specific failing test flagged by the evaluator. Enforces PABX rules (real component imports, manual service instantiation, localStorage/jQuery mock order, Promise.all() mock correctness, cleanup, English-only). Never modifies production code.
dayvisonassis/sdd-skills · ★ 1 · Testing & QA · score 72
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