Coverage Check
Context
Run in parallel:
git diff --name-only- get unstaged filesgit diff -U0 --no-color- get changed line numbers
Commands
Sequential:
npm run test:ci- vitest with coveragenpm run coverage:report- generate lcov/text reports
Workflow
- Get unstaged files and line ranges (parallel):
git diff --name-onlygit diff -U0 --no-color
- Run coverage:
npm run test:cinpm run coverage:report
- Parse
coverage/lcov.info(seelcov-format.mdfor format details) - Map changed lines to coverage data
- Report uncovered lines:
file.ts:42 - Summary: X/Y changed lines covered
Rules
- Only analyze unstaged changes (
git diff) - Use sequential commands:
test:cithencoverage:report - Parse lcov.info for coverage data
- Report uncovered lines:
file.ts:42 - Ignore files without coverage data (non-code files)