Agent skill · software engineering · aiskillstore
tdd-workflow
Test-Driven Development methodology for Node.js/TypeScript projects.
Why this skill is useful
Provides specific patterns and examples for implementing TDD in Node.js/TypeScript, which the AI wouldn't reliably generate on its own.
What it needs
About 2k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
TDD Workflow Skill Overview Test-Driven Development methodology for Node.js/TypeScript projects. The RED-GREEN-REFACTOR Cycle RED Phase: Design Failing Tests Write tests BEFORE implementation: 1. Identify Behavior: What should the code do? 2. Design Test Cases: Cover all scenarios 3. Write Tests: Use AAA pattern 4. Run Tests: Confirm they FAIL 5. Verify Failure: Tests fail for the RIGHT reason GREEN Phase: Minimal Implementation Make tests pass with minimal code: 1. Focus: One failing test at a time 2. Implement: Just enough to pass 3. Verify: Run tests, confirm GREEN 4. Iterate: Next failing test 5. Complete: All tests passing REFACTOR Phase: Improve Design Improve code while keeping tests green: 1. Review: Identify code smells 2. Plan: Choose refactoring 3. Apply: Make the change 4. Verify: Tests still GREEN 5. Repeat: Until quality gates met AAA Pattern Test Naming Convention Format: should {expectedBehavior} when {scenario} Examples: Test Categories Unit Tests Test pure functions and logic No I/O, no side effects Fast execution High isolation Integration Tests Test module boundaries Include I/O operations Test with real (or fake) dependencies Contract Tests Verify API contracts Type safety at boundaries Response shape validation Test Doubles Stub Returns canned data: Mock Verifies interactions: Fake Working implementation: Spy Records calls: Test Organization Anti-Patterns Testing Implementation Details Overly Specific Assertions Test Interdependence
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/tdd-workflow