The Main Reason To Write Tests

Patrick Divine
Better Programming
Published in
2 min readOct 19, 2019

--

Hint: It isn’t to make sure new code works

Photo by Moritz Mentges on Unsplash

The Common Reasons

Here are some reasons commonly cited in support of writing tests:

  • To make sure new code works
  • To find bugs before they happen
  • To document your code

--

--