TDD-workflows

Installation
SKILL.md

TDD Workflows

Overview

This skill outlines advanced Test-Driven Development (TDD) patterns and workflows. It moves beyond the basic Red-Green-Refactor cycle into practical patterns for complex systems, legacy codebases, and team environments. You should invoke this skill when defining testing strategies, setting up CI/CD test gates, or tackling tricky testing scenarios like external dependencies or stateful systems.

Core Principles

  • Test Behavior, Not Implementation: Tests should not break if the internal private implementation details change, only if the public behavior changes.
  • Fast Feedback Loop: Unit tests must run in milliseconds. A slow test suite discourages developers from running it.
  • Isolate the Subject Under Test (SUT): Use test doubles (mocks, stubs, fakes) judiciously to isolate the code being tested.
  • Tests as Documentation: A well-structured test suite serves as executable documentation of the system's requirements.

Preparation Checklist

  • Ensure a fast, reliable test runner is configured (e.g., Jest, Pytest, xUnit).
  • Determine the boundaries of the unit or module you are about to test.
  • Identify any external dependencies (databases, APIs) that need to be mocked or faked.
Installs
1
GitHub Stars
3
First Seen
2 days ago
TDD-workflows — heldinhow/awesome-opencode-dev-skills