Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Mocking Strategy?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/karthikrshet-mocking-strategy)
---
name: mocking-strategy
description: "Decide what to mock: boundaries yes, your own logic no; prefer fakes and contract-checked stubs."
tags: [testing]
---
# Mocking Strategy
## When to use
- Writing tests with external dependencies
## Procedure
1. Mock only at process boundaries (HTTP, clock, randomness, payments)
2. Prefer in-memory fakes for your own interfaces
3. Verify mocks match real behaviour with contract tests
## Checklist
- [ ] Mocks reflect real responses
## Anti-patterns
- Mocking everything so tests prove nothing