mocking

Community

Zero-overhead wrappers to mock external dependencies.

Authormgreenly
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Mock external dependencies in tests.

Core Features & Use Cases

  • MOCKABLE pattern: zero-overhead wrappers for deterministic unit tests by providing weak symbol overrides in debug builds.
  • Override in tests: replace the weak symbols in your test files to simulate failures or specific behavior without changing production code.
  • Wrappers list: provides a structured set of wrappers for common POSIX and C stdlib calls to keep tests hermetic.
  • Use Case: test a module that depends on open/read/write by substituting mock implementations during CI runs.

Quick Start

Add wrapper.h and wrapper.c, replace calls with wrappers, and override weak symbols in tests to simulate failures.

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
Download link: https://github.com/mgreenly/ikigai/archive/main.zip#mocking

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.