Test automatically generate comprehensive unit tests from source code covering happy paths, edge cases, and error conditions. Use when creating test coverage for functions, classes, or modules. Trigger with phrases like "generate unit tests", "create tests for", or "add test coverage".
Automatically generates comprehensive unit tests covering happy paths, edge cases, and error conditions. Use when you need to create test coverage for functions, classes, or modules by triggering with phrases like "generate unit tests" or "create tests for".
/plugin marketplace add jeremylongshore/claude-code-plugins-plus/plugin install unit-test-generator@claude-code-plugins-plusThis skill is limited to using the following tools:
assets/README.mdreferences/README.mdscripts/README.mdThis skill provides automated assistance for unit test generator tasks.
Before using this skill, ensure you have:
tests/, __tests__/, spec/)Examine code structure and identify test requirements:
Select appropriate testing framework based on language:
Create comprehensive test suite covering:
Generate test file in {baseDir}/tests/ with structure:
The skill generates complete test files:
// Example Jest test file
import { validator } from '../src/utils/validator';
describe('Validator', () => {
describe('validateEmail', () => {
it('should accept valid email addresses', () => {
expect(validator.validateEmail('test@example.com')).toBe(true);
});
it('should reject invalid email formats', () => {
expect(validator.validateEmail('invalid-email')).toBe(false);
});
it('should handle null and undefined', () => {
expect(validator.validateEmail(null)).toBe(false);
expect(validator.validateEmail(undefined)).toBe(false);
});
});
});
Generated mocks for:
Common issues and solutions:
Module Import Errors
Mock Setup Failures
Async Test Timeouts
Test Isolation Issues
This skill provides automated assistance for unit test generator tasks. This skill provides automated assistance for the described functionality.
Example usage patterns will be demonstrated in context.
Master defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI/CD pipelines, or system utilities requiring fault tolerance and safety.