Skip to main content

Unit Test Generator

Code
By TryPrompts.fast | 2 views 0 copies |

Prompt

Generate comprehensive unit tests for this code. Include: 1. **Happy Path Tests**: Normal expected behavior 2. **Edge Cases**: Boundary values, empty inputs, null values 3. **Error Cases**: Invalid inputs, exceptions 4. **Mocking**: Mock external dependencies appropriately Use the appropriate testing framework (Jest, pytest, JUnit, etc.). Structure tests with clear descriptions. Aim for high coverage of critical paths. Provide the test file with all imports and setup code included.

Rate this prompt

Click to rate

0.0 avg rating (0)
Subcategory: ChatGPT