Settings

Theme

How big does my project have to be to unit test?

arstechnica.com

4 points by nathanpc · 2 comments

Reader

2 threads
jdlshore

Related on HN: "Should you TDD a MVP?" http://news.ycombinator.com/item?id=4986665

I'd answer this question pretty much the same way I answered the MVP question: http://news.ycombinator.com/item?id=4986852

richo

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).

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection