mock-module
OfficialPrevent cross-test pollution when mocking Node.js built-ins.
Software Engineering#unit tests#testing#node.js#mock#test isolation#built-in modules#cross-test pollution
AuthorZaxbyHub
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Improper mocking of Node.js built-in modules in test suites causes cross-test pollution, leading to flaky, unreliable test results that waste developer time and break CI/CD pipelines.
Core Features & Use Cases
- Enforces spreading real module exports when mocking Node.js built-ins to isolate test environments
- Eliminates state leakage between test cases that causes inconsistent, hard-to-debug test failures
- Use Case: When writing unit tests for a Node.js app that uses the fs or path built-in modules, this skill ensures your mocks don't leak state between test runs, so every test produces consistent, reliable results.
Quick Start
Use the mock-module skill to properly mock the Node.js fs built-in module in your test suite without causing cross-test pollution.
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: mock-module Download link: https://github.com/ZaxbyHub/opencode-swarm/archive/main.zip#mock-module 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 536,000+ vetted skills library on demand.