consumer-test-coverage
Installation
SKILL.md
Consumer Test Coverage
Overview
Improve coverage by exercising consumer-visible behavior with infra mocked, while preserving API behavior and meeting coverage targets for the scoped service.
Workflow
- Read the relevant specs for the target service and map them to consumer-facing flows.
- Identify consumer-facing entrypoints: gRPC/HTTP handlers, public service methods, event consumers, pub/sub outputs.
- Add tests for success and failure paths that validate API outputs, state changes, and emitted events.
- Mock infra boundaries (DB, Redis, gRPC clients, timers, network listeners) to avoid real I/O.
- Avoid real servers; use handler calls or stubbed
http.createServerand fake timers. - Use
vi.hoistedwhen mocked values are referenced byvi.mockfactories. - Run scoped coverage for the service and iterate until coverage target is met (default 80% unless specs say otherwise).
- When asked to run full test or lint suites, defer to the
run-tests-lintskill workflow.