← ClaudeAtlas

testdoc-lintlisted

Scans test files (Python unittest and pytest, JavaScript and TypeScript Jest, Vitest and Mocha, Go, Java JUnit) for tests that cannot fail or that hide failures: no assertions, assertTrue(True), not-None-only checks, empty bodies, expect() with no matcher, skips without a reason, sleeps, swallowed exceptions, commented-out assertions and snapshot-only tests. Then fixes each one so it can fail. Use when the user says "are my tests any good", "find tests that never fail", "audit our test quality", "this test passes but checks nothing", "lint my tests", or "why did this bug get past the tests".
vivekbhange-hub/test-doctor-skill · ★ 0 · Testing & QA · score 75
Install: claude install-skill vivekbhange-hub/test-doctor-skill
# testdoc-lint: tests that cannot fail A green suite only means something if the tests could have been red. `weak_tests.py` scans test files for the patterns that make a test pass no matter what the code does, with a rule id, severity and `file:line` for each. You then fix them one by one, checking each fix can fail. ## Inputs - A test directory or specific test files. Python is parsed with `ast`; JS/TS, Go and Java use pattern matching, so expect a few misses and the odd false alarm. - Commands below say `python3`; on Windows use `python` (or `py -3`). ## Outputs - `testdoc/weak-tests.md`: findings by rule and by location. - Fixed tests, grouped in one commit per rule or per file, each shown to fail when the code is wrong. - A list of findings you chose not to fix, with the reason. ## Steps 1. **Confirm permission.** Scan and edit tests only in a repository the user owns or is authorized to change. 2. **Scan.** ``` python3 "${CLAUDE_SKILL_DIR}/weak_tests.py" tests -o testdoc/weak-tests.md ``` Useful flags: `--min-severity medium`, `--ignore WT007,WT010` for rules the project accepts, `--json` for scripts, and `--fail-on high` to make it a CI gate (exit code 1). 3. **Read the count line first.** If more than a third of the tests have findings, say so before fixing anything: the suite's green status has been overstated and the user should know. 4. **Fix high findings first**, one rule at a time: | Rule | What it means | Fix | |---|---|--