tests-doubles-and-isolation

Installation
SKILL.md

Tests Doubles And Isolation

Goal

Use test doubles to control dependencies while keeping tests readable, trustworthy, and resistant to harmless refactors.

For concise mocking examples, see MOCKING.md.

Vocabulary

  • Fake: generic replacement that looks like a real collaborator.
  • Stub: fake used to feed controlled input or errors into the unit. A stub should not decide whether the test passes.
  • Mock/spy: fake used to verify an interaction. It can fail the test.
  • Isolation framework: library that creates and configures fakes dynamically.

If the project or framework uses different names, keep the conceptual distinction clear in variable names.

Decision Flow

Installs
2
First Seen
Apr 26, 2026
tests-doubles-and-isolation — klovaaxel/agent-testing-skills