Skip to content
Veracy Toolbox
← All prompts

Unit Test Generator

IT Developer

The prompt

Write unit tests for this function.

{{paste_your_function}}

Language/framework: {{python_pytest_javascript_jest_typescript}}

Please write tests covering:
1. Happy path: expected input/output
2. Edge cases: empty, null, boundary, large inputs
3. Error cases: invalid types, out-of-range, expected exceptions
4. Side effects: mock external calls

For each test:
- A descriptive test name
- Arrange / Act / Assert structure
- Comment explaining what failure would mean