5 ms·
> Either I am writing really good code so there are no bugs, or I am really bad a writing unit testing code to find those bugs. Honestly, having literally had
by solraph 3y ago
> Either I am writing really good code so there are no bugs, or I am really bad a writing unit testing code to find those bugs.
Honestly, having literally had a scenario 20 minutes ago where I wrote a test for what I figured was absolutely trivial code, and having it _fail_ on me and pick up a bug that I hadn't considered (and this is not the first time this has happened) I would strongly suggest it's the latter.
Do your unit tests the output and side effects exactly, or do they just make sure the function returned without error?
Just because function/method/whatever has 100% coverage, doesn't mean you have tested all the potential scenarios.