TDD avec Jest

Enforce the TDD cycle with Jest for tested code.

1|Updated Sep 15, 2025
One-click install
npx skills add https://github.com/jls42/leapmultix --skill tdd-avec-jest
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: TDD avec Jest
Source: https://github.com/jls42/leapmultix/tree/main/.claude/skills/tdd-jest
Command: npx skills add https://github.com/jls42/leapmultix --skill tdd-avec-jest

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing code without tests can lead to bugs, regressions, and difficulty in refactoring, increasing development time and risk. This Skill enforces the Test-Driven Development (TDD) cycle (RED/GREEN/REFACTOR) using Jest, ensuring every piece of code is thoroughly tested and validated before implementation.

Core Features & Use Cases

  • Structured TDD Workflow: Guides you through writing failing tests first (RED), then minimal code to pass (GREEN), and finally refactoring (REFACTOR) with confidence.
  • Jest Best Practices: Covers essential Jest assertions, mocking techniques, and specialized testing for async operations, DOM, and Canvas.
  • Code Coverage Enforcement: Aims for > 80% coverage for branches, functions, lines, and statements, ensuring comprehensive testing and reducing untested code.
  • Use Case: When developing a new game logic module, activate this Skill to write tests that define the expected behavior, then implement the code, and finally refactor with confidence, knowing your tests will catch any regressions before they impact users.

Quick Start

1. Write a failing test (RED)

test('should add two numbers', () => { expect(add(1, 2)).toBe(3); });

2. Write minimal code to pass (GREEN)

function add(a, b) { return a + b; }

3. Refactor if needed (tests stay GREEN)

Run tests

npm test