Test Coverage Scan

Scan PR diffs to verify changed source files have corresponding test changes.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/BedaBeda-Growth/bedabeda-growth-site --skill test-coverage-scan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Test Coverage Scan
Source: https://github.com/BedaBeda-Growth/bedabeda-growth-site/tree/main/skills/test-coverage-scan
Command: npx skills add https://github.com/BedaBeda-Growth/bedabeda-growth-site --skill test-coverage-scan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces the 1-for-1 test rule by ensuring every changed source file has a corresponding test file change in the PR.

Core Features & Use Cases

  • Scans the diff between main and HEAD to identify primary source files (.js, .ts, .tsx, .py, .go).
  • Correlates changed files to their test counterparts using filename similarity (e.g., user-profile.ts -> user-profile.test.ts).
  • Provides PR-scoped results with PASS, WARN, or FAIL, and supports a strict mode for blocking gates.

Quick Start

Run the scan with python3 grok-personal/scripts/test_coverage_scan.py to verify that every changed source file has a corresponding test.

Frequently Asked Questions about Test Coverage Scan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce 1-for-1 test coverage for changed files in a PR?

To enforce 1-for-1 test coverage, scan the diff between main and HEAD to identify changed source files and verify they have corresponding test file changes. The scan reports PASS, WARN, or FAIL, and strict mode blocks merging.

Does the test coverage scan support frontend and backend codebases across multiple languages?

Yes, the test coverage scan supports frontend and backend codebases across multiple languages. It identifies primary source files including .js, .ts, .tsx, .py, and .go, ensuring every changed file has a corresponding test.

How does the scan map source files to their corresponding test files?

The scan maps source files to tests using filename similarity, such as correlating user-profile.ts to user-profile.test.ts. It scans the diff between main and HEAD to correlate changed files to their test counterparts.

Can I block merging in CI when a changed source file lacks test changes?

Yes, you can block merging in CI by enabling the optional strict mode. This mode fails the check and blocks merging when a changed source file lacks a corresponding test file change in the PR.

How do I run a test coverage scan to verify PR changes have corresponding tests?

To run the test coverage scan and verify changes, execute python3 grok-personal/scripts/test_coverage_scan.py. This identifies changed source files and validates that every changed file has a corresponding test.