tdd-workflow

Enforces test-driven development with unit, integration, and E2E tests at 80% coverage.

Updated May 7, 2026
One-click install
npx skills add https://github.com/mirzadham/trainingroombookingsystem2 --skill tdd-workflow-mirzadham
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/mirzadham/trainingroombookingsystem2/tree/main/.agent/.agents/skills/tdd-workflow
Command: npx skills add https://github.com/mirzadham/trainingroombookingsystem2 --skill tdd-workflow-mirzadham

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code written without tests is fragile and risky to refactor. This Skill enforces a strict test-first workflow so every feature, bug fix, or refactor ships with unit, integration, and E2E coverage before implementation begins. ## Core Features & Use Cases - Test-First Workflow: Guides the RED-GREEN-REFACTOR cycle, requiring failing tests before any implementation code is written. - Runner Detection: Resolves the correct package manager and test runner (npm, pnpm, yarn, Bun, Jest, Vitest, bun:test) so commands work in any project setup. - Coverage Gates: Enforces a minimum 80% coverage threshold across branches, functions, lines, and statements. - Use Case: When adding a new API endpoint, the Skill walks you through writing user journeys, generating failing test cases, implementing minimal code to pass, and verifying coverage before committing. ## Quick Start Use the tdd-workflow skill to implement this feature with tests written before any code.

Frequently Asked Questions about tdd-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I practice test-driven development in a JavaScript project?▼

Write failing tests first based on user journeys, then implement minimal code to make them pass, and refactor while keeping tests green. This Skill structures that RED-GREEN-REFACTOR cycle and verifies 80% coverage at the end.

What test types should a TDD workflow include?▼

A complete TDD workflow includes unit tests for functions and components, integration tests for API endpoints and database operations, and E2E tests with Playwright for critical user flows. Each layer catches different classes of defects.

How do I run tests with Bun instead of Jest or Vitest?▼

Use bun test for Bun's native runner when test files import from bun:test, and bun run test only when the package.json test script invokes Jest or Vitest. Confusing the two is a common failure in ESM-only projects.

Does this workflow support Playwright E2E testing?▼

Yes, it includes Playwright patterns for browser automation covering critical user flows like search, form submission, and navigation. It recommends semantic selectors such as button text or data-testid attributes over brittle CSS classes.

Why do my tests fail when mocking external services?▼

Mocks fail when the mocked module shape does not match the real import structure. Mock external dependencies like Supabase, Redis, or OpenAI at the module boundary and mirror their actual API surface, including nested method chains.