Testing is often an afterthought when writing code. It can be confusing, slow down development, and if implemented poorly provides questionable utility. The following are some tips for preemptively writing and structuring your code so that it is easy to unit test.
Full article