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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Testing Angular.js

7 点作者 rockyj将近 12 年前

1 comment

mackwic将近 12 年前
The problem with this kind of article is they are too trivial to be truly original and don&#x27;t help testing a real application, even a light one. Who want to test his evening project ?<p>Worst, it&#x27;s by far too light on karma and E2E testing. They have a lot of pitfalls, traps, and documentation is nearly inexistent. A shame considering the size of these projects.<p>I upvoted, though, because I want more discussion on that topic.<p>For anyone who want further links about Unit-testing on Angular, I recommend the series from Benjamin Lesh on testing controllers[1], services[2], and directives[3].<p>This article[4] from The Year of Moo is also excellent and introduces the limit of End-to-end testing with a solution.<p>[1]: <a href="http://www.benlesh.com/2013/05/angularjs-unit-testing-controllers.html" rel="nofollow">http:&#x2F;&#x2F;www.benlesh.com&#x2F;2013&#x2F;05&#x2F;angularjs-unit-testing-contro...</a><p>[2]: <a href="http://www.benlesh.com/2013/06/angular-js-unit-testing-services.html" rel="nofollow">http:&#x2F;&#x2F;www.benlesh.com&#x2F;2013&#x2F;06&#x2F;angular-js-unit-testing-servi...</a><p>[3]: <a href="http://www.benlesh.com/2013/06/angular-js-unit-testing-directives.html" rel="nofollow">http:&#x2F;&#x2F;www.benlesh.com&#x2F;2013&#x2F;06&#x2F;angular-js-unit-testing-direc...</a><p>[4]: <a href="http://www.yearofmoo.com/2013/01/full-spectrum-testing-with-angularjs-and-karma.html" rel="nofollow">http:&#x2F;&#x2F;www.yearofmoo.com&#x2F;2013&#x2F;01&#x2F;full-spectrum-testing-with-...</a><p>I&#x27;ll be highly interested if someone has anything consistent about Karma and Angular-scenario. I didn&#x27;t find anything satisfactory about setup anything bigger than 200 LoC. For what I saw, people run away from Angular-scenario and inject Jasmine and Mocks as a work-around.