sdcorejs-testing-unit-nestjs

Community

Generate focused NestJS unit tests

Authorsdcorejs
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevents regressions in NestJS business logic by producing reliable unit tests that validate outcomes, thrown exception types, and transaction behavior without touching real DBs or networks.

Core Features & Use Cases

  • Unit-test service logic with mocked collaborators: tests one service method with repositories and query runners mocked, including transaction rollback/commit checks.
  • Test mappers and DTO mapping rules: verifies mapping of fields and null-handling in pure mapper functions without brittle snapshots.
  • Test Zod validators with table-driven cases: uses it.each for multiple inputs and confirms bilingual error messages without re-testing Zod itself.
  • Light controller wiring tests: validates controller delegates to service and returns expected results, while pushing heavy logic into the service.

Quick Start

Use sdcorejs-testing-unit-nestjs to write unit tests for a NestJS service method, mapper, or Zod schema after the implementation lands.

Dependency Matrix

Required Modules

None required

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: sdcorejs-testing-unit-nestjs
Download link: https://github.com/sdcorejs/sdcorejs-agent/archive/main.zip#sdcorejs-testing-unit-nestjs

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.