Increase Test Coverage
Target threshold: $ARGUMENTS%
If no argument provided, prompt the user for a target.
Step 1: Gather Requirements
- •Find coverage config (jest.config.js, vitest.config.ts, .nycrc, etc.)
- •Run coverage report to get current state:
bash
bun run test:cov 2>&1 | head -100
- •Identify the 20 files with lowest coverage, noting:
- •File path
- •Current coverage % (lines, branches, functions)
- •Which lines/branches are uncovered
Step 2: Create Plan
In plan mode, create a plan that includes the following details:
markdown
Increase test coverage from [current]% to $ARGUMENTS%. ## Files Needing Coverage (ordered by coverage gap) 1. src/services/user.ts - 23% coverage (target: $ARGUMENTS%) - Uncovered: lines 45-67, 89-102 - Missing branch coverage: lines 34, 56 2. src/utils/helpers.ts - 34% coverage (target: $ARGUMENTS%) - Uncovered: lines 12-45 ... ## Configuration - Config file: [path to coverage config] - Update thresholds to $ARGUMENTS% for: lines, branches, functions, statements ## Acceptance Criteria - All files meet $ARGUMENTS% coverage threshold - `bun run test:cov` passes with no threshold violations ## Verification Command: `bun run test:cov` Expected: All thresholds pass at $ARGUMENTS%