tdd-patterns

Community

Master TDD with Bun, build robust software.

Authoraitchwhy
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a structured approach to Test-Driven Development (TDD) using the Bun test runner, ensuring that code is built with a strong test foundation. It leads to higher quality, fewer bugs, and a clearer understanding of requirements before implementation.

Core Features & Use Cases

  • Test Pyramid Hierarchy: Guides on structuring tests into E2E (few), Integration (moderate), and Unit (many) layers for comprehensive and efficient coverage.
  • Red-Green-Refactor Cycle: Enforces the core TDD loop: write a failing test, write the minimal code to make it pass, then refactor to improve design.
  • Bun Test Integration: Provides patterns for writing unit and integration tests using Bun's native test runner, including describe, test, expect, and beforeEach/afterEach setup/teardown.
  • Use Case: A developer is about to implement a new feature. They can use this skill to start by writing a failing unit test, then write the minimal code to make it pass, and finally refactor, ensuring the feature is well-tested from the outset.

Quick Start

Write a failing unit test for a new 'calculateDiscount' function in 'src/utils/pricing.ts' that expects a 10% discount for orders over $100.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: tdd-patterns
Download link: https://github.com/aitchwhy/dotfiles/archive/main.zip#tdd-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository