

Testing Angular.js - rockyj
http://rockyj.in/2013/08/03/testing_angularjs.html

======
mackwic
The problem with this kind of article is they are too trivial to be truly
original and don't help testing a real application, even a light one. Who want
to test his evening project ?

Worst, it'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.

I upvoted, though, because I want more discussion on that topic.

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

This article[4] from The Year of Moo is also excellent and introduces the
limit of End-to-end testing with a solution.

[1]: [http://www.benlesh.com/2013/05/angularjs-unit-testing-
contro...](http://www.benlesh.com/2013/05/angularjs-unit-testing-
controllers.html)

[2]: [http://www.benlesh.com/2013/06/angular-js-unit-testing-
servi...](http://www.benlesh.com/2013/06/angular-js-unit-testing-
services.html)

[3]: [http://www.benlesh.com/2013/06/angular-js-unit-testing-
direc...](http://www.benlesh.com/2013/06/angular-js-unit-testing-
directives.html)

[4]: [http://www.yearofmoo.com/2013/01/full-spectrum-testing-
with-...](http://www.yearofmoo.com/2013/01/full-spectrum-testing-with-
angularjs-and-karma.html)

I'll be highly interested if someone has anything consistent about Karma and
Angular-scenario. I didn'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.

