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.zipInstalls 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.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
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
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| unit-test-implementation (this skill) | 1 | 6mo | Review | Advanced |
| dependency-upgrade | 26 | 6mo | Review | Intermediate |
| angular-best-practices | 21 | 5mo | No flags | Advanced |
| validate-typescript | 5 | 11mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by AztecProtocol
View all by AztecProtocol →You might also like
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
angular-best-practices
sickn33
Angular performance optimization and best practices guide. Use when writing, reviewing, or refactoring Angular code for optimal performance, bundle size, and rendering efficiency.
validate-typescript
BerryKuipers
Run TypeScript compiler type-checking (tsc --noEmit) to validate type safety and catch type errors. Works with any TypeScript project. Returns structured output with error counts, categories (type/syntax/import errors), and affected files. Used for quality gates and pre-commit validation.
ts-testing
johnlindquist
Design, implement, and maintain high‑value TypeScript test suites using popular JS/TS testing libraries. Use this skill whenever the user is adding tests, debugging failing tests, or refactoring code that should be covered by tests.
react-best-practices
redpanda-data
Client-side React performance optimization patterns.
feature-flags
Use when feature flag tests fail, flags need updating, understanding @gate pragmas, debugging channel-specific test failures, or adding new flags to React.