Test Effectiveness Checker is a small VS Code extension MVP for spotting likely weak JavaScript and TypeScript unit tests. It scans only the current Jest/Vitest-style test file and surfaces deterministic findings in the Problems panel plus a lightweight summary view.
- Scan the currently active JavaScript or TypeScript test file with the
TestEffectiveness: Scan Current Test Filecommand. - Detect likely weak tests with deterministic rules for weak assertions, happy-path bias, and mocking risk.
- Surface findings in native VS Code diagnostics so results appear in the Problems panel and jump to the relevant location.
- Show a lightweight side-panel summary with the current file name, grouped finding counts, and finding details.
- Support common Jest and Vitest-style test patterns for local, current-file analysis.
- Validate rule behavior with fixture-driven unit tests under
fixtures/.
These are future-looking capabilities summarized from PRD.md and IMPLEMENTATION_SPEC.md. They are not all implemented today.
- A quick effectiveness score with an overall file score, dimension breakdowns, and red/yellow/green status.
- Targeted mutation checking for the production code related to the current test file.
- AI-assisted repair suggestions that help strengthen weak tests after findings are detected.
- Richer editor UX such as more navigable side-panel items, decorations, and other targeted in-editor feedback.
- Expanded rule coverage beyond the initial three families, including more structural test smells and deeper behavior checks.
- Install dependencies:
npm install- Build the extension:
npm run build- Run tests:
npm run test- Run lint:
npm run lint- Open this folder in VS Code.
- Run
npm install. - Run
npm run build. - Press
F5to launch the Extension Development Host. - In the host window, open a
*.test.*or*.spec.*JS/TS file. - Run
TestEffectiveness: Scan Current Test Filefrom the Command Palette.
This repo now includes a minimal debug configuration in .vscode/launch.json and a matching build task in .vscode/tasks.json, so F5 should build and launch the extension directly.
WA001Generic existence-only assertionWA002Snapshot-only testWA003Shallow assertion on complex return
HP001No negative case in fileHP002Boundary-free test coverageHP003Only success-path descriptions
MR001Interaction-only testMR002High mock densityMR003Core dependency over-mocked
- The scan only analyzes the active file.
- Findings are heuristic but deterministic.
- The fixture files under
fixtures/are treated as the canonical examples for expected v0 rule behavior. - The rules are intentionally conservative to avoid noisy output on healthy tests such as
fixtures/healthy.test.ts.