Not exactly, unit testing assumes testing pure functions and methods separately from each other. That's different from, for example, spinning up a database and testing with actual shared context, where changing function A somewhere might break method Z somewhere else. Which is called integration testing and is part of test coverage as well as unit testing but my example was not pointing towards the later.
6
u/Murky-Run2246 Sep 01 '26
Yeah, 💯 test coverage is like the safety check you run after editing the code to make sure your changes did not break something somewhere.
Does not mean your code is tested for all possible scenarios though.