UN

unit-test-implementation

A collection of best practices for writing efficient unit tests in TypeScript using jest-mock-extended.

Install

mkdir -p .claude/skills/unit-test-implementation && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3606" && unzip -o skill.zip -d .claude/skills/unit-test-implementation && rm skill.zip

Installs to .claude/skills/unit-test-implementation

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Best practices for implementing unit tests in this TypeScript monorepo. Use when writing new tests, refactoring existing tests, or fixing failing tests. Covers mocking strategies, test organization, helper functions, and assertion patterns.
240 chars✓ has a “when” trigger
Advanced

Key capabilities

  • →Detects exponential test slowdowns
  • →Implements jest-mock-extended patterns
  • →Provides guidelines for mock objects
  • →Standardizes assertion patterns
  • →Enforces domain-specific mock props

How it works

Scans test files for specific anti-patterns and replaces them with recommended mocking implementations to avoid state-based performance issues.

Inputs & outputs

You give it
Test file or test logic
You get back
Compliance report on mocking practices

When to use unit-test-implementation

  • →Writing unit tests with jest-mock-extended
  • →Refactoring slow test suites
  • →Implementing mock objects for database services

About unit-test-implementation

Provides guidance on efficient mocking strategies for TypeScript monorepos. It prevents exponential test slowdowns by ensuring domain objects are not passed directly as mock properties.

Best practices for implementing unit tests in this TypeScript monorepo. Use when writing new tests, refactoring existing tests, or fixing failing tests. Covers mocking strategies, test organization, helper functions, and assertion patterns.

When not to use it

  • →Projects without TypeScript
  • →Simple integration tests

Prerequisites

jestTypeScriptjest-mock-extended

Limitations

  • →Requires manual code refactoring
  • →Specific to TypeScript monorepos

How it compares

Focuses on performance-aware mocking to prevent exponential slowdowns in test suites.

Compared to similar skills

unit-test-implementation side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
unit-test-implementation (this skill)16moReviewAdvanced
dependency-upgrade266moReviewIntermediate
angular-best-practices215moNo flagsAdvanced
validate-typescript511moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry