sdcorejs-testing-integration-nestjs

Community

Write real DI + DB integration tests fast.

Authorsdcorejs
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Removes flaky, incomplete testing by validating NestJS service and repository logic with real TypeORM wiring and real SQL execution paths (without the HTTP server).

Core Features & Use Cases

  • Integration coverage without HTTP: Exercises Test.createTestingModule DI container wiring plus repository + service behavior while skipping the HTTP layer.
  • Fast DB realism with pg-mem: Runs against an in-memory Postgres (pg-mem) to validate queries, transactions, and constraints using a real DataSource.
  • Boundary mocking at integration points: Mocks external APIs at the provider boundary (not at the HTTP-client level) to keep tests deterministic.
  • Typical use cases: transaction semantics rollback checks, query correctness, business-logic error paths like ConflictException and NotFoundException, and permission/guard verification.

Quick Start

Use sdcorejs-testing-integration-nestjs to generate an integration spec that boots a real Nest testing module and a pg-mem TypeORM DataSource, seeds minimal lookup data, and asserts both happy-path and error-path behavior against the database state.

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