# Test Coverage

> Analyze test coverage and generate missing tests to reach 80%+ coverage. Use when coverage is low, after adding features, or when the user asks to improve test coverage.

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

---


# Test Coverage

Analyze test coverage and generate missing tests:

1. Run tests with coverage: npm test --coverage or pnpm test --coverage

2. Analyze coverage report (coverage/coverage-summary.json)

3. Identify files below 80% coverage threshold

4. For each under-covered file:
   - Analyze untested code paths
   - Generate unit tests for functions
   - Generate integration tests for APIs
   - Generate E2E tests for critical flows

5. Verify new tests pass

6. Show before/after coverage metrics

7. Ensure project reaches 80%+ overall coverage

Focus on:
- Happy path scenarios
- Error handling
- Edge cases (null, undefined, empty)
- Boundary conditions

