Imported from amaiagalvez/demo13 (
.github/skills/fix-tests/SKILL.md). Install upstream withnpx skills add amaiagalvez/demo13 --skill fix-tests. Copyright stays with the author.
FIX FAILING TESTS
- Run the narrowest failing suite:
DX php artisan test --compact <path|--filter=name>(use the argument, or ask the user for it; run the full suite only if asked). - For each failure, reproduce it with the narrowest command and read the test plus the production code it covers.
- Decide: bug in production code, bug in the test, or environment issue. Fix production code unless the test itself is wrong; if you change a test, say why.
- Make the smallest safe change. Keep sibling-file conventions, do not refactor unrelated code, do not touch unrelated findings.
- After PHP edits:
DX ./vendor/bin/pint --dirty --format agent. - Rerun the narrowest test after each fix, then the affected suite.
- Report every command executed and its real result. Never claim a test passed unless it ran.
