What problem does it solve?
Writing tests for new or modified code is repetitive and requires deep knowledge of each package's conventions. This Skill analyzes your git changes and drafts Jest tests that follow FXA testing rules, giving you a reviewed starting point instead of a blank file.
Core Features & Use Cases
- Automatic Scope Detection: Targets staged/unstaged changes by default, or accepts a file path, commit ref, or git range as an argument.
- Convention-Aware Drafting: Explores existing test files, shared mocks (mockDB, mockLog, mockMailer), and jest.mock patterns in each package before writing tests.
- Review-First Workflow: Presents a test plan table covering happy paths, error cases, edge cases, and branches, then pauses for your confirmation before drafting.
- Use Case: After modifying an account route handler in fxa-auth-server, run the Skill to get draft spec tests covering success, NotFound errors, and boundary conditions, plus callouts for hard-to-test code.
Quick Start
Ask the assistant to draft Jest tests for your current uncommitted changes, or specify a file path or commit range to target.