testing-nestjs-applications

Installation
SKILL.md

Testing NestJS Applications

When to use

  • Writing tests for use cases, controllers, or full HTTP flows
  • Setting up test strategy for a NestJS feature
  • Replacing mocks with hand-rolled fakes

Core rules

  1. Unit tests: domain entities with pure assertions (no NestJS testing module)
  2. Use-cases tested with hand-rolled fakes (not jest.mock)
  3. Integration tests: Test.createTestingModule with real or fake providers
  4. E2E tests: Supertest against bootstrapped app
  5. No jest.mock for internal modules; only for third-party if needed

Reference shape (TypeScript)

Unit Test (Domain Entity)

import { User } from './user.entity';
Installs
3
GitHub Stars
1
First Seen
May 4, 2026
testing-nestjs-applications — j4flmao/agent_skills_nodejs_nestjs