From unit-test-generator
Generates unit tests for a function, class, or module, identifying test cases, mocking dependencies, and verifying coverage.
How this command is triggered — by the user, by Claude, or both
Slash command
/unit-test-generator:generate-testsThe summary Claude sees in its command listing — used to decide when to auto-load this command
Generate comprehensive unit tests for a specified function, class, or module. ## Steps 1. Read the target function or module to understand its behavior: 2. Identify test cases by category: 3. Identify dependencies that need mocking: 4. Write tests using the project's testing framework: 5. Add setup and teardown for shared test state. 6. Run the tests to verify they pass. 7. Check coverage: does the new test cover all branches? ## Format ## Rules - Follow the existing test conventions in the project. - Test behavior, not implementation details. - Mock external dependencies, never m...
Generate comprehensive unit tests for a specified function, class, or module.
Target: <function/class name>
Tests Generated: <count>
Coverage: <lines/branches covered>
Framework: <jest|pytest|cargo test|etc>
6plugins reuse this command
First indexed Mar 30, 2026
npx claudepluginhub avelikiy/awesome-claude-code-toolkit --plugin unit-test-generator/generate-testsGenerates unit tests for a function, class, or module, identifying test cases, mocking dependencies, and verifying coverage.
/unit-testGenerates unit tests for a module, analyzing exported functions/classes, detecting the testing framework, and producing tests for happy paths, edge cases, and errors. Runs tests to verify they pass.
/generate-test-casesAnalyzes target code and generates comprehensive unit, integration, and edge-case test suites with mocks, stubs, and data-driven tests.
/write-testsGenerates thorough unit tests for a specified file or function, auto-detecting the test framework and following project conventions. Runs tests after writing to confirm they pass.
/test-generateAnalyzes source files and generates unit tests with mocking, edge cases, and framework-specific patterns.
/generate-testsGenerates a comprehensive test suite for the specified code, including unit, integration, and framework-specific tests following project conventions.