test-driven-development

Drive PHP and JS/TS development with Red-Green-Refactor test cycles.

2|1|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/sraloff/gravityboots --skill test-driven-development-sraloff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/sraloff/gravityboots/tree/main/.agent/skills/test-driven-development
Command: npx skills add https://github.com/sraloff/gravityboots --skill test-driven-development-sraloff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TDD reduces regression risk by defining tests before implementation and guiding design.

Core Features & Use Cases

  • Red-Green-Refactor workflow for feature development.
  • Support for PHP (Pest/PHPUnit) and JS/TS (Jest/Vitest) testing.
  • Clear naming conventions and fast feedback for unit tests.

Quick Start

Write a failing test for a new feature, then implement the minimum code to pass, and refactor while keeping tests green.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I use TDD to write unit tests before implementation code?

TDD unit tests define expected behavior before writing code. You write a failing test for a new feature, implement the minimum code required to pass it, and then refactor safely while keeping tests green.

Does this TDD workflow support PHP with Pest or PHPUnit testing?

Yes, this TDD workflow explicitly supports PHP testing using Pest or PHPUnit. It applies the Red-Green-Refactor cycle to PHP projects, ensuring clear test naming and fast feedback loops during feature development.

What is the Red-Green-Refactor cycle in test-driven development?

The Red-Green-Refactor cycle is a test-driven development process where you first write a failing test, implement the minimum code to make it pass, and then refactor the code while keeping tests green to reduce regression risk.

Can I use Jest and Vitest for JavaScript and TypeScript unit testing workflows?

Yes, you can use Jest and Vitest for JavaScript and TypeScript unit testing workflows. The approach guides test organization and enforces fast feedback loops specifically within JS and TS environments.

Why does test-driven development help with safe code refactoring?

Test-driven development helps with safe refactoring by defining behavior with tests before implementation. These tests act as a safety net, allowing you to modify and improve code structure without introducing regressions or breaking existing functionality.