From herow-dev
(herow) Generate a comprehensive test suite for the specified file, module, or function.
How this command is triggered — by the user, by Claude, or both
Slash command
/herow-dev:generate-tests <file-or-function-path>code/This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Generate Tests > **Recommended subagents (when installed):** for **TypeScript/JavaScript** targets, delegate the implementation to `fullstack-developer`; for **Python** targets, delegate to `python-pro`. After tests are written, optionally hand off to `code-reviewer` to validate coverage and quality. Invoke via the `Agent` tool with the matching `subagent_type`. If the agent file is not present at `~/.claude/agents/<name>.md`, execute the steps below directly. Your task is to create a comprehensive test suite for the target specified in `$ARGUMENTS`. ## Step 1 — Identify the target Pa...
Recommended subagents (when installed): for TypeScript/JavaScript targets, delegate the implementation to
fullstack-developer; for Python targets, delegate topython-pro. After tests are written, optionally hand off tocode-reviewerto validate coverage and quality. Invoke via theAgenttool with the matchingsubagent_type. If the agent file is not present at~/.claude/agents/<name>.md, execute the steps below directly.
Your task is to create a comprehensive test suite for the target specified in $ARGUMENTS.
Parse $ARGUMENTS:
file:FunctionName or file::ClassName pattern, scope the analysis to that export.$ARGUMENTS is empty, ask the user to specify a target.Read.package.json (Jest, Vitest, Testing Library), pytest.ini / pyproject.toml (pytest), Cargo.toml (#[cfg(test)]), go.mod (table-driven tests), etc.ls on the nearest __tests__, tests, or spec directory if it exists.@testing-library for UI, plain Vitest for logic.pytest with pytest-mock._test.go files.#[cfg(test)] modules.For each exported function/method:
it("returns empty array when input is empty").describe block).Before finishing, self-check:
Report to the user: file written, framework used, number of tests generated, estimated coverage, and any gaps that require human judgment.
These subagents ship with the herow-dev plugin and sharpen the output when installed. The command works without them.
fullstack-developer — when the target is TypeScript/JavaScript (Vitest, Jest, Testing Library). Best for React/Next.js components, tRPC procedures, or Drizzle queries.python-pro — when the target is Python (pytest, pytest-mock). Brings ruff/mypy strict discipline to the generated suite.code-reviewer — after tests are written, to audit coverage, mock hygiene, and flag anti-patterns before commit.Each is optional. If none are installed, run the steps above inline.
npx claudepluginhub judsonjuniorr/claude-config --plugin herow-dev/generate-testsGenerates comprehensive test suite for specified code including unit, integration, edge cases, mocks, and utilities, adapting to project testing framework and conventions.
/generate-testsGenerates comprehensive test suite for specified code including unit, integration, edge cases, mocks, and utilities, adapting to project testing framework and conventions.
/generate-testsGenerate production-ready unit tests for source code files or snippets. Auto-detects framework (Jest, pytest, JUnit, etc.), covers happy paths, edges, errors, mocks.
/generate-testsGenerates unit, integration, edge case, mock, and framework-specific tests for specified code, following project testing conventions and adapting to Jest, Vitest, Cypress.