DEV Community

Discussion on: Me: "I tested and it works, why do I have to write tests?"

Collapse
 
gklijs profile image
Gerard Klijs

I often found bugs while I thought it worked fine while adding tests. I often keep adding tests till almost all the code is covered. Unless purely a passion project, or a proper proof of concept, I can't imagine not writing tests.

Collapse
 
briwa profile image
briwa • Edited

Yes, writing tests helps me "rediscover" my own code as well: optimization, finding bugs, making it DRY-er.