/fix-tests — correr y arreglar tests fallidos
Copiar y pegar
Sección titulada «Copiar y pegar»---description: Run the tests, fix the failuresallowed-tools: Bash(npm test:*), Bash(pnpm test:*), Read, Edit---
1. Run the project's test suite2. For each failing test, read the error and the related code3. Decide whether the bug is in the code (fix the code) or in the test (fix the test, only if the test is poorly written, never to make a real bug pass)4. Apply the minimal fix needed5. Re-run the tests to confirm
If a test fails for a reason you don't understand (external dependency, flaky), don't touch it — report it instead of guessing.Resumen
Sección titulada «Resumen»| Dónde | Archivo |
|---|---|
| Claude Code | .claude/commands/fix-tests.md |
| Cursor | .cursor/commands/fix-tests.md |
Consideraciones
Sección titulada «Consideraciones»- El paso 3 es el que más importa: un test que falla porque encontró un bug real no debería “arreglarse” cambiando el test — eso es ocultar el problema, no resolverlo. El prompt lo deja explícito a propósito.
- Para proyectos con test runner distinto a npm/pnpm (Vitest standalone, pytest, etc.), ajustar
allowed-toolsal comando real.