DEV Community

Discussion on: Why code changes are error prone

Collapse
 
thepeoplesbourgeois profile image
Josh • Edited

The shorter answer is

Write tests.

Test coverage is specifically to ensure that the changes you make within your code don't result in breakages to your expected behaviors. If you cover the expected behaviors (both success and failure) of your code, you can confidently make changes to that code, because any breaking changes will create failures in your tests

Collapse
 
sargalias profile image
Spyros Argalias

That's right. A good test suite is the best defence.