
Nestjs Testing Expert
Stand up Jest unit, integration, and e2e tests for NestJS modules without flaky TestModule setups.
Overview
nestjs-testing-expert is an agent skill for the Ship phase that teaches Jest unit, integration, and e2e testing patterns for NestJS apps.
Install
npx skills add https://github.com/shipshitdev/library --skill nestjs-testing-expertWhat is this skill?
- Maps testing pyramid: unit logic, module integration, HTTP e2e with supertest
- Documents Test.createTestingModule with explicit providers and jest.fn doubles
- Covers in-memory DB adapters and test containers for integration realism
- Includes checklist: arrange/act/assert, error paths, deterministic fast runs
- Testing pyramid with unit, integration, and e2e layers
- Checklist covering arrange/act/assert and error paths
Adoption & trust: 606 installs on skills.sh; 25 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your NestJS service grew past manual testing and your Jest suite is flaky, over-mocked, or missing HTTP-level coverage.
Who is it for?
Solo backend devs on NestJS who need a repeatable Jest playbook before shipping REST or GraphQL APIs.
Skip if: Frontend-only projects, non-Nest Node frameworks, or teams that already standardized on Vitest with a different DI pattern.
When should I use this skill?
Writing unit or integration tests for NestJS, setting up TestModule, mocking providers, or debugging flaky tests.
What do I get? / Deliverables
After applying the skill, your agent adds structured TestModule setups, mocks, and supertest e2e paths with clear error-path coverage.
- Unit and integration spec files
- E2E supertest suites covering HTTP routes and error paths
Recommended Skills
Journey fit
Testing guidance belongs on the Ship shelf because it hardens the API before launch, even though tests are written alongside Build. Canonical subphase is testing due to Jest pyramid, Test.createTestingModule, supertest e2e, and mock hygiene.
How it compares
Skill package for Nest Jest conventions—not a hosted CI runner or generic JavaScript testing intro.
Common Questions / FAQ
Who is nestjs-testing-expert for?
Indie builders and small teams shipping NestJS APIs who want agent help writing deterministic Jest tests at unit, module, and HTTP layers.
When should I use nestjs-testing-expert?
In Ship (testing) while adding or fixing specs; optionally during Build (backend) when scaffolding a new module you intend to cover immediately.
Is nestjs-testing-expert safe to install?
Check the Security Audits panel on this Prism page and review the skill files locally—tests may suggest shell or DB tooling you should gate in CI.
SKILL.md
READMESKILL.md - Nestjs Testing Expert
{ "name": "nestjs-testing-expert", "version": "1.0.0", "description": "Testing patterns for NestJS apps using Jest, covering unit, integration, and e2e tests.", "author": { "name": "Ship Shit Dev", "email": "hello@shipshit.dev", "url": "https://github.com/shipshitdev" }, "license": "MIT", "skills": "." } --- name: nestjs-testing-expert description: Testing patterns for NestJS apps using Jest, covering unit, integration, and e2e tests. metadata: version: "1.0.0" tags: "nestjs, testing, jest" --- # NestJS Testing Expert You build reliable Jest test suites for NestJS modules, services, and controllers. ## When to Use - Writing unit or integration tests for NestJS - Setting up TestModule, mocking providers, or database fakes - Debugging flaky tests ## Testing Pyramid - Unit tests for pure logic and services - Integration tests for modules with real providers - E2E tests for HTTP APIs ## Common Patterns - Use `Test.createTestingModule` with explicit providers. - Mock external services with jest.fn or test doubles. - For DB: use in-memory adapters or test containers when needed. - Prefer `supertest` for HTTP-level e2e. ## Tips - Keep tests deterministic. - Reset mocks between tests. - Avoid shared mutable state. ## Checklist - Clear arrange/act/assert structure - Minimal mocking - Covers error paths - Fast to run