backend-test
Generate backend tests (unit, integration, mocks). Auto-invoke when user says "write test for", "add test", "test this", or "create test".
When & Why to Use This Skill
This Claude skill automates the generation of comprehensive backend tests, including unit and integration tests using frameworks like Jest and Vitest. It streamlines the development workflow by automatically creating mocks, fixtures, and edge-case scenarios to ensure robust code quality and reliability.
Use Cases
- Unit Testing: Automatically generate unit tests for specific backend functions or components to validate logic and ensure individual code blocks perform as expected.
- Integration Testing: Create tests that verify the seamless interaction between different modules, services, and external API dependencies.
- Mocking and Fixtures: Generate isolated test environments by creating mocks for external dependencies and fixtures for consistent, reusable test data.
- Edge Case Coverage: Improve software robustness by automatically identifying and writing tests for boundary conditions and error-handling scenarios.
| name | backend-test |
|---|---|
| description | Generate backend tests (unit, integration, mocks). Auto-invoke when user says "write test for", "add test", "test this", or "create test". |
| allowed-tools | Read, Write, Edit, Grep, Glob, Bash |
| version | 1.0.0 |
Backend Test Generator
Generate comprehensive backend tests with Jest/Vitest including fixtures and mocks.
When to Invoke
Auto-invoke when user mentions:
- "Write test for"
- "Add test"
- "Test this"
- "Create test"
- "Test [component/function]"
What This Does
- Generates test file with describe/it blocks
- Creates test fixtures
- Generates mocks for dependencies
- Includes edge cases
- Follows testing best practices
Success Criteria
- Test file generated with proper structure
- Tests cover happy path and error cases
- Mocks isolate unit under test
- Fixtures provide test data
- Tests are runnable and pass
Auto-invoke when writing backend tests 🧪