Hacker News new | ask | show | jobs
by richo 4899 days ago
It's simple really:

For production code, test everything. anything less than 100% test coverage (outside of a one man team) is a disaster looking for a place to happen.

In my personal projects, I write no tests. And then I get to some point where _as I'm implementing_, I need to check it's working. Then I write my first test.

And so on, writing tests for anything that's awkward to verify as I'm authoring it, and also key points that I'm planning to refactor later (to ensure it still works afterwards).