tdd-workflow

Implement end-to-end tests for NestJS services using Jest and Supertest.

Updated Feb 2, 2026
One-click install
npx skills add https://github.com/k3sdtw/.claude --skill tdd-workflow-k3sdtw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/k3sdtw/.claude/tree/main/skills/tdd-workflow
Command: npx skills add https://github.com/k3sdtw/.claude --skill tdd-workflow-k3sdtw

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams enforce robust end-to-end testing for NestJS services that follow the Clean Architecture pattern, reducing regression risk and accelerating safe changes.

Core Features & Use Cases

  • E2E testing framework for NestJS apps using Jest and Supertest to validate HTTP flows across controllers, use cases, and repositories.
  • Guided TDD workflow (RED-GREEN-REFACTOR) that ensures tests drive design and implementation, with fixtures, mocks, and test scaffolding.
  • Suitable for new features, bug fixes, and API endpoints to ensure reliable behavior in production-like environments.

Quick Start

Create a new e2e test file under test/e2e for the API endpoint and run the E2E suite to verify end-to-end behavior.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I write end-to-end tests for NestJS APIs using Jest and Supertest?

E2E testing for NestJS validates HTTP flows across controllers, use cases, and repositories using Jest and Supertest. This skill provides a RED-GREEN-REFACTOR workflow with test scaffolding, fixtures, and mocks to drive design and ensure reliable behavior in production-like environments.

Can I apply TDD to NestJS services that follow Clean Architecture?

Yes. This skill guides test-driven development for Clean Architecture NestJS apps by structuring E2E tests that exercise Controller, UseCase, and Repository layers. Tests are created first under test/e2e, then implementation follows the RED-GREEN-REFACTOR cycle.

What's the best way to test new API endpoints and bug fixes in NestJS?

Create E2E tests under test/e2e that validate the full request-response flow for new features and bug fixes. This skill provides guidance on test structure, fixture setup, and mocking strategies to ensure endpoints behave correctly across all architectural layers.

Do I need Supertest to test NestJS HTTP endpoints?

Supertest is a primary tool for E2E testing NestJS HTTP flows in this workflow. It integrates with Jest to make real or simulated HTTP requests and validate responses, making it essential for testing controllers and their integration with use cases and repositories.

How does the RED-GREEN-REFACTOR workflow reduce regression risk?

RED-GREEN-REFACTOR ensures tests drive implementation by writing failing tests first, then implementation, then refactoring. This approach catches regressions early, enforces design clarity, and accelerates safe changes by validating behavior across all layers before production deployment.