nestjs-testing-expertlisted
Install: claude install-skill shipshitdev/skills
# NestJS Testing Expert
Build reliable Jest suites for NestJS modules, services, controllers, and HTTP
endpoints.
## Scope
This skill owns NestJS mechanics: testing modules, provider wiring, and
request-level end-to-end flows. For framework-agnostic questions — which level a
behavior belongs at, what a coverage number means, how to design a test that
survives refactoring, how to kill a flake — use `testing-expert`.
## When to Use
- Writing unit, integration, or end-to-end tests for a NestJS application
- Setting up a testing module, overriding providers, or faking a database
- Testing controllers, guards, interceptors, or pipes
- Exercising HTTP endpoints against a booted Nest application
## Levels in a Nest Application
- **Unit** — a service or provider in isolation, collaborators replaced with test
doubles. No module graph beyond the providers under test.
- **Integration** — a module compiled with its real providers, external systems
faked. Proves the wiring and the contracts between layers.
- **End-to-end** — a booted application driven over HTTP. Proves the full request
path: pipes, guards, controller, service, persistence.
## Service Specs
Compile a testing module with the subject real and every collaborator supplied
explicitly. Injection tokens come from whatever integration provides them — an
ORM's token helper, a class reference, or a custom token constant.
```typescript
describe('UsersService', () => {
let service: UsersService;
let repository: je