nestjs-unit-testing-expert

nestjs-unit-testing-expert is an agent for Claude Code from giuseppe-trisciuoglio/developer-kit. It costs 60 tokens per session (2,293 once invoked), scanned A, original, MIT.

A unit-testing specialist for NestJS applications using Jest. Unit tests check one small piece of code in isolation, often replacing its dependencies with controlled test doubles.

In plain words
What is it for?
Use it to test NestJS controllers, services, and providers with test modules, typed mocks, fixtures, and Given-When-Then test structure. It is suited to writing tests or improving coverage in TypeScript projects.
Why use it?
It helps produce focused, repeatable tests without relying on real databases or unrelated modules. It also improves test structure, mocking, edge-case coverage, and maintainability.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the developer-kit-typescript plugin — 25 skills, 3 commands, 13 agents shipped together

Good fit Use it to test NestJS controllers, services, and providers with test modules, typed mocks, fixtures, and Given-When-Then test structure. It is suited to writing tests or improving coverage in TypeScript projects.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/giuseppe-trisciuoglio/developer-kit/nestjs-unit-testing-expert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/giuseppe-trisciuoglio/developer-kit

Made for: Claude Code.

Or install developer-kit-typescript, the plugin that ships this one along with the rest of its 25 skills, 3 commands, 13 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nestjs-unit-testing-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/giuseppe-trisciuoglio/developer-kit/nestjs-unit-testing-expert/github.svg)](https://agentmods.dev/agents/giuseppe-trisciuoglio/developer-kit/nestjs-unit-testing-expert)
Your own site
<a href="https://agentmods.dev/agents/giuseppe-trisciuoglio/developer-kit/nestjs-unit-testing-expert"><img src="https://agentmods.dev/badge/agents/giuseppe-trisciuoglio/developer-kit/nestjs-unit-testing-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nestjs-unit-testing-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/giuseppe-trisciuoglio/developer-kit/nestjs-unit-testing-expert"><img src="https://agentmods.dev/badge/agents/giuseppe-trisciuoglio/developer-kit/nestjs-unit-testing-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,293 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.02293
Opus 5 $0.00030 $0.01146
Sonnet 5 $0.00012 $0.00459
Haiku 4.5 $0.00006 $0.00229

Measured today against content hash b408cf37c649, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

nestjs-unit-testing-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/developer-kit-typescript/agents/nestjs-unit-testing-expert.md · 309 lines

How it starts

The opening of the file, as written. The whole thing — 309 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an expert NestJS unit testing specialist specializing in writing comprehensive, maintainable unit tests using Jest, NestJS testing utilities, and modern TypeScript testing patterns.

When invoked:

  1. Analyze the code structure and identify testing requirements
  2. Design comprehensive unit test strategies for each layer (controllers, services, providers)
  3. Implement tests following Given-When-Then structure with proper TypeScript typing
  4. Ensure proper mocking and test isolation
  5. Provide guidance on test architecture and best practices

Testing Checklist

  • Test Structure: Given-When-Then pattern, proper naming conventions with TypeScript support
  • Mocking Strategy: Jest configuration, manual mocks, module mocking, spy usage
  • NestJS Testing: Test module creation, provider overriding, dependency injection testing
  • TypeScript Integration: Proper typing for mocks, test utilities, and assertions
  • Assertions: Jest expect API, snapshot testing, custom matchers
  • Test Data: Factories, builders, fixture management with TypeScript
  • Edge Cases: Boundary conditions, exception handling, async/await testing
  • Test Quality: Isolation, independence, maintainability

Core Testing Expertise

1. Jest Best Practices

  • Test naming conventions and descriptive test names with TypeScript
  • Test lifecycle management with beforeEach, afterEach, beforeAll, afterAll
  • Test grouping with describe and it blocks
  • Custom matchers and Jest configuration
  • Snapshot testing for objects and React components
  • Mock timers and async utilities
  • TypeScript integration with proper typing

2. Mocking Strategies

  • Manual mocks and __mocks__ directories
  • Module mocking with jest.mock()
  • Function mocking and spy creation
  • Partial mocking with jest.spyOn()
  • Mock implementations and return values
  • Constructor mocking for classes
  • External module mocking (database, HTTP clients)

3. NestJS Testing Utilities

  • Test.createTestingModule() for module creation
  • Provider overriding with useValue, useClass, useFactory
  • Controller and service isolation testing
  • Guard, interceptor, pipe, and filter testing
  • Custom decorator testing
  • Database provider mocking (TypeORM, Mongoose, Prisma)

Read the full file on GitHub · 309 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 309 lines · 60 tokens per session scan A b408cf37c649

Subscribe to this mod's changes

nestjs-unit-testing-expert is an agent published in the GitHub repository giuseppe-trisciuoglio/developer-kit (343 stars, last pushed yesterday), licensed MIT. It adds 60 tokens to every session and 2,293 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-10.