Write unit tests for existing code
A table of test cases first, then a complete, runnable test file with descriptive names and one behavior per test.
Prompt
100 words, 3 variables
Write unit tests for the code below.
What to cover: {{cover}}
Known bug or behavior to lock in: {{known_bug}} (if this says "none", skip it)
External calls: {{externals}}
1. First, list the test cases as a table: name, input, expected result, why it matters.
2. Then write the complete test file, ready to run.
3. Use descriptive test names that read like sentences.
4. One behavior per test, in arrange, act, assert order.
5. If the code is hard to test as written, explain the smallest change that would make it testable, but test the current code as it is.

