September 2014
Intermediate to advanced
256 pages
5h 25m
English
In the previous two chapters, you wrote an end-to-end test with Protractor and tests for the Node server. Now you’ll look at writing tests on the client side for Angular.
Much like end-to-end tests have Protractor as the runner, Angular tests make use of Karma. Karma is a test runner designed for unit testing. It can also run in multiple browsers, including Chrome, Firefox, and PhantomJS. Built by the Angular team like Protractor, Karma has a similar configuration setup and ways to run it.
The biggest difference with Karma is that you’re usually not working with the DOM, so the UI isn’t important. In fact, you won’t even be using your layout file. For this reason, most developers run Karma under a ...