| name | tdd-workflow |
| description | Test-driven development cycle — write tests first, run vitest, check coverage, verify red-to-green transition. Use when validating code changes or writing new tests. |
Skill: TDD Workflow
Test-driven development cycle for validating changes.
When to Use
- Writing tests for new functionality before implementation
- Verifying a bug fix with a regression test (red → green)
- Checking test coverage after code changes
Steps
- Write test first — define expected behavior before checking implementation
- Run tests —
npx vitest run to verify current state
- Check coverage —
npx vitest run --coverage for coverage report
- Verify red→green — new tests should fail before fix, pass after
Commands
npx vitest run
npx vitest run tests/specific/
npx vitest run --coverage
npx tsc --noEmit
npx eslint src/