mocking-patterns

Community

Master Jest mocks to isolate tests.

Authorkarchtho
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Mocking patterns and tools for Jest to isolate code under test from external dependencies and side effects.

Core Features & Use Cases

  • Mocking with jest.fn(): create deterministic test doubles and control return values.
  • Module Mocking with jest.mock(): simulate dependencies and isolate unit behavior.
  • Spying & Dependency Injection: observe real implementations or override behavior in tests.

Quick Start

Use the skill to illustrate how to mock dependencies in a Jest-based test suite and isolate the unit under test.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: mocking-patterns
Download link: https://github.com/karchtho/my-claude-marketplace/archive/main.zip#mocking-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.