DDD Testing Standards
CommunityEnsure backend reliability with rigorous DDD testing.
AuthorRomualdP
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill establishes a robust testing methodology for Domain-Driven Design (DDD) backend applications, ensuring critical business logic is thoroughly validated and preventing regressions. It enforces strict coverage requirements and promotes a Test-Driven Development (TDD) approach.
Core Features & Use Cases
- Layered Testing: Guides on creating unit tests for Domain Entities and Value Objects (100% coverage mandatory), Application Layer handlers (95%+ coverage), and integration tests for critical workflows.
- TDD Workflow: Promotes a Red-Green-Refactor cycle, ensuring tests are written before implementation, leading to more reliable and well-documented code.
- Coverage Enforcement: Defines strict code coverage thresholds for different layers, integrated into
jest.config.jsand CI/CD pipelines. - Use Case: When developing a new DDD bounded context, use this Skill to structure your test suite, write comprehensive tests for your domain logic, and ensure high code quality before deployment.
Quick Start
To test a new domain entity, create a *.spec.ts file in tests/unit/domain/entities/ and write a failing test for a business method. Then, implement the minimal code to make the test pass, and refactor while keeping the test green.
Dependency Matrix
Required Modules
jest@nestjs/testingprisma
Components
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: DDD Testing Standards Download link: https://github.com/RomualdP/hoki/archive/main.zip#ddd-testing-standards Please download this .zip file, extract it, and install it in the .claude/skills/ directory.