Write tests for the edge cases I forgot
Skips the happy path and goes after what breaks.
Write tests for the function below using [TEST FRAMEWORK]. Skip the obvious happy path — I already have it. Focus on: - Boundary values (0, 1, empty, max, off-by-one). - Null, undefined, and missing fields. - Malformed or hostile input. - Ordering and concurrency, if the function is stateful. For each test, name it after the behaviour it protects, not the function. Point out any case you think is unreachable and why. CODE: [PASTE FUNCTION]
Want a different version? Copy it, change the wording, and publish it as your own.