sdcorejs-tdd

Enforce test-driven development across Angular, NestJS, and Next.js write-code tasks.

2|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/sdcorejs/sdcorejs-agent --skill sdcorejs-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sdcorejs-tdd
Source: https://github.com/sdcorejs/sdcorejs-agent/tree/main/plugin/skills/sdcorejs-tdd
Command: npx skills add https://github.com/sdcorejs/sdcorejs-agent --skill sdcorejs-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents production-code-first development by enforcing a failing test (RED) before any implementation, tailored to Angular, NestJS, and Next.js testing patterns.

Core Features & Use Cases

  • RED state correctness: Ensures tests fail for the right reason (missing implementation) instead of broken tests or setup.
  • GREEN minimal implementation: Guides writing the least code required to make the test pass without over-building.
  • Refactor safely: Keeps behavior stable while extracting setup and improving clarity after tests pass.
  • Framework-aware boilerplate: Provides Angular TestBed, NestJS Jest unit/integration patterns, and Next.js Jest testing approaches to avoid re-deriving setup.

Use case example: Implement a new service method in the correct behavior and verify it using the appropriate unit test scaffold; only after RED is achieved, add the minimal method logic, then refactor setup and rerun to confirm GREEN stays.

Quick Start

Invoke sdcorejs-tdd before implementing a service/component/function/handler in your write-code task to generate a failing test first, then follow red-green-refactor to reach passing tests.

Frequently Asked Questions about sdcorejs-tdd

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

FAQPage Schema
How do I enforce test-driven development with a red-green-refactor workflow in NestJS and Angular?

You enforce test-driven development by generating a failing test before implementation, using Angular TestBed or NestJS Jest patterns to verify the RED state fails for the right reason, then writing minimal code to reach GREEN before refactoring.

What is the correct way to write a failing unit test before implementing a service method?

Writing a failing unit test requires generating framework-aware boilerplate first, ensuring the test fails specifically because the implementation is missing rather than broken setup, establishing a true RED state for the red-green-refactor cycle.

Can I use Angular TestBed configurations for unit-testing components in a TDD workflow?

Yes, Angular TestBed is supported for unit-testing components by providing the correct boilerplate setup, ensuring tests fail for the right reason during the RED phase before adding minimal implementation logic to pass.

How do I write minimal implementation code to pass a failing Jest test without over-building?

Minimal implementation code is guided by writing the least logic required to make the failing Jest test pass, satisfying the GREEN phase of red-green-refactor while keeping behavior stable for subsequent safe refactoring.

Does this TDD approach work with Next.js Jest testing patterns for handlers and functions?

Yes, the TDD approach works with Next.js Jest testing patterns by providing specific boilerplate for handlers and functions, applying the same red-green-refactor verification rules across Angular, NestJS, and Next.js environments.

Why do my TDD tests fail for the wrong reason during the RED state verification?

Tests fail for the wrong reason when setup is broken instead of the implementation being missing, so RED state correctness ensures your unit tests fail specifically due to missing production code before you proceed to the GREEN phase.