Write unit tests for a function
Write unit tests for the function below, using [TEST_FRAMEWORK].
<code>
[CODE]
</code>
Cover the normal case, the edge cases (empty input, zero, very large values, invalid
types) and every error the function can raise. Name each test after the behaviour it
checks. Before the code, list the cases you are testing in one line each, so I can spot
a missing one.
More Claude prompts
- Ask the user a multiple-choice questionYou need structured input from the user before continuing.
- Brief and launch a sub-agentYou are launching a specialized sub-agent to perform autonomous work.
- Catch-up recap after a breakThe user stepped away and is returning. Compose a brief catch-up message.
- Code review with prioritised findingsReview the [LANGUAGE] code below. It is part of [PROJECT_CONTEXT].
- Compact a long coding session into a summaryProduce a condensed summary of the entire conversation for seamless continuation.
- Consolidate an agent's memory filesRun a "dream" consolidation pass over the memory directory to produce a clean, non-redund…