developing-with-tdd

Implement a repeatable TDD workflow for backend services with TypeScript and Vitest.

11|2|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/porcupine-md/jonggrang --skill developing-with-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: developing-with-tdd
Source: https://github.com/porcupine-md/jonggrang/tree/main/skills/library/backend/developing-with-tdd
Command: npx skills add https://github.com/porcupine-md/jonggrang --skill developing-with-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implements a repeatable TDD workflow to improve reliability of backend code.

By enforcing Red-Green-Refactor cycles, concrete testing templates, and mocking guidance, it helps teams prevent regressions and design better APIs.

Use cases include building new features, safely refactoring existing modules, and validating API contracts with tests.

Core Features & Use Cases

  • Red-Green-Refactor cycle to guide feature development from failing test to passing code.
  • TypeScript/Vitest test templates with co-located tests for fast feedback.
  • Mocking external dependencies and pragmatic test doubles to isolate units.
  • Definition of Done including test coverage targets and performance considerations.

Quick Start

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

Frequently Asked Questions about developing-with-tdd

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

FAQPage Schema
How do I start test-driven development for backend TypeScript modules?

Start test-driven development by writing a failing test for the desired behavior, implementing the minimum code to pass, and refactoring while keeping tests green. This enforces a Red-Green-Refactor cycle to prevent regressions and design better APIs.

What is the Red-Green-Refactor cycle in backend testing?

The Red-Green-Refactor cycle is a test-driven development workflow that guides feature development from a failing test to passing code, followed by safe refactoring. It improves backend code reliability and ensures fast feedback.

Can I use Vitest with TypeScript for backend mocking and testing?

Yes, Vitest works with TypeScript to provide co-located test templates and mocking guidance. It isolates units by mocking external dependencies using pragmatic test doubles, ensuring fast feedback for backend services.

What's the best way to mock external dependencies when testing backend APIs?

The best way to mock external dependencies is by using pragmatic test doubles to isolate units. This approach is guided by concrete testing templates that validate API contracts and ensure fast, reliable feedback.

When do I need test-driven development for refactoring existing backend services?

You need test-driven development when safely refactoring existing modules or building new backend features. It enforces a Definition of Done with test coverage targets, preventing regressions and validating API contracts.