What problem does it solve?
Writing comprehensive backend tests, including setting up mocks and fixtures, can be time-consuming and repetitive. This skill automates the boilerplate, allowing developers to focus on test logic.
Core Features & Use Cases
- Automated Test File Generation: Creates test files with
describe/it blocks, ready for unit and integration tests using Jest/Vitest.
- Mocks and Fixtures: Automatically generates mocks for dependencies and provides test fixtures to isolate the unit under test.
- Edge Case Inclusion: Prompts for and includes common edge cases to ensure thorough test coverage.
- Use Case: You've just built a new API endpoint. Invoke this skill with "Write test for user service," and it will generate a test file with basic structure, mocks for your database, and example fixtures, ready for you to fill in the specific assertions.
Quick Start
Example: Generate tests for a backend function
"Write test for user authentication service"