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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Is there such a thing as the NoMock movement?

2 点作者 sentiental超过 12 年前

1 comment

boyter超过 12 年前
Pointless example. There is no value in testing the method for success. However how it deals with failures/exceptions inside the dependencies might be worth testing.<p>Anyone with some amount of testing experience knows that testing isn't a silver bullet, and sometimes its not worth testing methods (straight getters and setters for example although there may be value there in a dynamic language).<p>As with many things, people jumped from one extreme of test/mock everything to test/mock nothing. The correct solution is usually somewhere in the middle.