TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

4 点作者 nathanpc超过 12 年前

2 条评论

jdlshore超过 12 年前
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>
richo超过 12 年前
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).