con un clic
tdd-workflow
Test-Driven Development workflow - write tests first, then implement
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Test-Driven Development workflow - write tests first, then implement
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Systematic approach to debugging and fixing issues
Create well-formatted commits following conventional commit standards
Create well-documented pull requests with proper descriptions
Safe code refactoring with proper testing and incremental changes
Guide for integrating external APIs securely and correctly
Reviews pull requests for code quality, security, and conventions
| name | TDD Workflow |
| description | Test-Driven Development workflow - write tests first, then implement |
| triggers | ["tdd","test first","write test first","test driven"] |
| allowed-tools | ["Read","Write","Edit","Glob","Grep","Bash(npm run test*)","Bash(pnpm test*)","Bash(yarn test*)","Bash(npx jest*)","Bash(npx vitest*)"] |
Implement features using strict Test-Driven Development methodology.
1. Understand the requirement
2. Write a test that describes the expected behavior
3. Run the test - confirm it FAILS
4. Commit: "test: add failing test for [feature]"
1. Write the MINIMUM code to make the test pass
2. No extra features, no "while I'm here" changes
3. Run the test - confirm it PASSES
4. Commit: "feat: implement [feature]"
1. Clean up the implementation
2. Remove duplication
3. Improve naming
4. Run tests - confirm they still PASS
5. Commit: "refactor: clean up [feature]"
describe('calculateTotal', () => {
it('should apply discount when coupon is valid', () => {
// Arrange
const cart = { items: [{ price: 100 }] };
const coupon = { discount: 0.1 };
// Act
const total = calculateTotal(cart, coupon);
// Assert
expect(total).toBe(90);
});
});
DO Mock:
DON'T Mock:
Before implementing any feature:
Ensure all tests pass before: