Hacker News new | ask | show | jobs
by blanecordes 5240 days ago
What is the best way to learn writing tests?
1 comments

The best thing is of course learn by actually doing it. Your tests don't have to be anything complicated, basically what you're doing is writing down your own assumptions about the code.

Those can be something like "when someone upvotes on a comment, then the comment should have +1 score" ...

Another thing that might help you is watching someone actually do TDD, for which I can recommend Destroy All Software screencasts https://www.destroyallsoftware.com/