TDD avec Jest
CommunityBuild robust code with Test-Driven Development.
Authorjls42
Version1.0.0
Installs0
System Documentation
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
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: TDD avec Jest Download link: https://github.com/jls42/leapmultix/archive/main.zip#tdd-avec-jest Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.