shell-test-mock-path-pattern
OfficialEffortlessly mock external commands in shell script tests
Software Engineering#testing#shell scripting#mocking#shell script testing#external command simulation
Authormanifoldlogic
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill addresses the challenge of testing shell scripts that rely on external commands without the need for those commands to be installed or configured, streamlining the testing process.
Core Features & Use Cases
- Mocking External Commands: Simulate external command behavior without actual command installation.
- Path Override and Logging: Override the PATH environment variable to use mock executables and log command invocations for verification.
- Use Case: Ideal for testing shell scripts that interact with tools like
crewchief,gh, orjq, allowing for accurate argument passing and command orchestration verification without real command execution.
Quick Start
Run the following command to test your shell script:
setup() {
TEST_TMP=$(mktemp -d)
mkdir -p "$TEST_TMP/mock-bin"
touch "$TEST_TMP/mock.log"
}
Dependency Matrix
Required Modules
None requiredComponents
scripts
💻 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: shell-test-mock-path-pattern Download link: https://github.com/manifoldlogic/claude-code-plugins/archive/main.zip#shell-test-mock-path-pattern 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 620,000+ vetted skills library on demand.