TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

4 pointsby nathanpcover 12 years ago

2 comments

jdlshoreover 12 years ago
Related on HN: "Should you TDD a MVP?" <a href="http://news.ycombinator.com/item?id=4986665" rel="nofollow">http://news.ycombinator.com/item?id=4986665</a><p>I'd answer this question pretty much the same way I answered the MVP question: <a href="http://news.ycombinator.com/item?id=4986852" rel="nofollow">http://news.ycombinator.com/item?id=4986852</a>
richoover 12 years ago
It's simple really:<p>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.<p>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.<p>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).