jest-mocking
CommunityMaster Jest mocking for robust tests.
Authorbradtaylorsf
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill simplifies the process of creating effective and maintainable unit tests by providing clear patterns and examples for mocking in Jest.
Core Features & Use Cases
- Function Mocking: Learn to create, configure, and assert on mock functions.
- Module Mocking: Understand how to mock entire modules or specific exports.
- Class Mocking: Mock class constructors and their methods for isolated testing.
- Spying: Observe function calls without altering their original behavior.
- Use Case: When testing a component that depends on an external API, use this Skill's techniques to mock the API calls, ensuring your tests are fast, reliable, and independent of network conditions.
Quick Start
Use the jest-mocking skill to generate a basic mock function for a utility.
Dependency Matrix
Required Modules
None requiredComponents
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: jest-mocking Download link: https://github.com/bradtaylorsf/alphaagent-team/archive/main.zip#jest-mocking Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.