tdd-testing

Provides automated scaffolding for writing unit and integration tests in Python and JavaScript/TypeScript projects, including mocks, fixtures, and runners for pytest and Jest, plus CI/CD-ready reports and badges for test coverage, with optional integration to GitHub's code-quality and diff-annotation systems for automated workflows and alerts on PRs and commits.

52|1|Updated Aug 2, 2025
One-click install
npx skills add https://github.com/codename-co/devs --skill tdd-testing-codename-co
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-testing
Source: https://github.com/codename-co/devs/tree/main/.github/skills/tdd-testing
Command: npx skills add https://github.com/codename-co/devs --skill tdd-testing-codename-co

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures code quality and prevents regressions by enforcing Test-Driven Development (TDD) practices for all new and modified code.

Core Features & Use Cases

  • Mandatory TDD: Enforces writing tests before implementation for critical code paths (src/lib/, src/stores/).
  • Clear Workflow: Guides users through the Red-Green-Refactor cycle.
  • Coverage Targets: Defines minimum acceptable test coverage percentages for different code modules.
  • Use Case: When developing a new feature for the agent orchestrator, use this Skill to write failing tests first, then implement the code to pass those tests, ensuring the new logic is well-tested and doesn't break existing functionality.

Quick Start

Follow the TDD workflow to write a failing test for the new function in src/lib/utils.ts.

Frequently Asked Questions about tdd-testing

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

FAQPage Schema
How do I implement Test-Driven Development using Vitest and React Testing Library?

To implement Test-Driven Development, this Skill guides you through a mandatory Red-Green-Refactor cycle using Vitest and React Testing Library, providing specific templates and commands to write unit, store, and component tests before writing implementation code.

What is the Red-Green-Refactor cycle and how does it prevent code regressions?

The Red-Green-Refactor cycle enforces writing failing tests first, then implementing code to pass those tests, and finally refactoring. This TDD workflow prevents regressions by ensuring all critical code paths in directories like src/lib and src/stores are validated before implementation.

What minimum code coverage targets should I set for unit testing different modules?

For unit testing, you should set specific minimum acceptable code coverage percentages tailored to different code modules. This Skill defines distinct coverage targets for libraries, stores, components, and pages to ensure robust code quality across your project architecture.

Can I use this TDD workflow for testing both utility functions and UI components?

Yes, you can use this TDD workflow for both utility functions and UI components. It includes specific testing templates and commands for unit tests in src/lib, store tests, and component testing using Vitest and React Testing Library to cover critical code paths.

When should I not use Test-Driven Development for my software project?

You should not use Test-Driven Development for non-critical code paths outside specified directories like src/lib and src/stores. This Skill enforces TDD specifically for critical logic to prevent regressions, meaning trivial or highly exploratory code might not require this strict workflow.