Command
Add Edge Case Tests
Adds tests for the boundary and error cases of one function: empty, huge, null, malformed and surprising input.
11. Locate the function, its types or docstring, its callers and any existing tests. Note its contract: accepted input, return value, thrown errors.
22. List edge cases by category: empty (empty string, list, object), null or undefined, boundaries (0, 1, -1, max, max plus one), size (very long strings, 100k items), text (unicode, emoji, combining marks, newlines, leading and trailing whitespace), numbers (NaN, Infinity, floats like 0.1 + 0.2, very large integers), dates (leap day, DST change, timezone), type confusion, and repeated or concurrent calls.
33. Predict the expected result for each from the contract. Where the contract is silent, mark the case as a question rather than guessing.
44. Write the tests in the existing style, one behavior per test, with readable names. Use table-driven or parameterized tests where the framework supports them.
55. Run them. For any failure, decide if the function has a bug. Do not edit the function and do not weaken the test; list the bug.
Claude CodeCodex
Add Edge Case Tests
CommandTesting
Free