test-helpers

Featured

Generate engine-specific test helper libraries for the project's test suite. Reads existing test patterns and produces tests/helpers/ with assertion utilities, factory functions, and mock objects tailored to the project's systems. Reduces boilerplate in new test files.

Testing & QA 40,030 stars 5224 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 97/100

Stars 20%
100
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Test Helpers Writing test cases is faster and more consistent when common setup, teardown, and assertion patterns are abstracted into helpers. This skill generates a `tests/helpers/` library tailored to the project's actual engine, language, and systems — so every developer writes less boilerplate and more assertions. **Output:** `tests/helpers/` directory with engine-specific helper files **When to run:** - After `/test-setup` scaffolds the framework (first time) - When multiple test files repeat the same setup boilerplate - When starting to write tests for a new system --- ## 1. Parse Arguments **Modes:** - `/test-helpers [system-name]` — generate helpers for a specific system (e.g., `/test-helpers combat`) - `/test-helpers all` — generate helpers for all systems with test files - `/test-helpers scaffold` — generate only the base helper library (no system-specific helpers); use this on first run - No argument — run `scaffold` if no helpers exist, else `all` --- ## 2. Detect Engine and Language Read `.claude/docs/technical-preferences.md` and extract: - `Engine:` value - `Language:` value - `Framework:` from the Testing section If engine is not configured: "Engine not configured. Run `/setup-engine` first." --- ## 3. Load Existing Test Patterns Scan the test directory for patterns already in use: ``` Glob pattern="tests/**/*_test.*" (all test files) ``` For a representative sample (up to 5 files), read the test files and extract: - Setup patterns (how `b...

Details

Author
Donchitos
Repository
Donchitos/Claude-Code-Game-Studios
Created
9 months ago
Last Updated
1 weeks ago
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category