stateful-mocks
CommunitySimulate sequential calls and race conditions for robust testing.
Authorjguadagno
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill enables developers to create mocks that replicate complex stateful interactions, essential for reliable testing of systems under conditions like race scenarios, retries, and state transitions.
Core Features & Use Cases
- Sequential Call Simulation: Mock methods to return different results on subsequent calls.
- State Transition Emulation: Mimic system state changes across multiple mock invocations.
- Use Case: Test a web controller handling double-submit errors by simulating a successful first call and a conflicting second call to ensure proper error handling.
Quick Start
Use the mock pattern to simulate a function that succeeds once then fails, verifying your error response.
Dependency Matrix
Required Modules
None requiredComponents
scriptsreferences
💻 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: stateful-mocks Download link: https://github.com/jguadagno/jjgnet-broadcast/archive/main.zip#stateful-mocks 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 471,000+ vetted skills library on demand.