Unit Test Suite Writer
Writes a thorough unit test suite for a function or module, including edge cases and failure paths.
ClaudeCode & Tech
78 words · free to use
Write unit tests for this code. Language and test framework: [e.g. Jest, Vitest, pytest] Code under test: [PASTE] How it is used: [CONTEXT] Cover: normal cases, boundaries (empty, zero, max, very long input), invalid input, error paths, and any async or time-dependent behavior (mock clocks and network). Group tests clearly, name them so a failure explains itself, and avoid testing implementation details. After the tests, list any behavior that looks like a bug you found while writing them.
How to use this prompt
- Copy the prompt with the button above.
- Replace the parts in brackets with your own details: [PASTE], [CONTEXT].
- Paste it into Claude and send it. It also works in other AI chat tools.
- Not quite right? Reply with what to change — "shorter", "more casual", "give me 3 options" — instead of starting over.