angular/angular.js — pull request #7575 by jmpalacios (2014-05-24 08:04:20+00:00)
Title: Karma also needs to be told about ngResource

In step 11 the controllers' unit tests are adapted to work with the Phone service, which uses the ngResource module. But for this to work, Karma's configuration also needs to be told to load the ```angular-resource.js``` file through its ```karma.conf.js``` configuration, and any testing runs that may be happening at the time restarted for the change to take effect.

Though the diff from step 10 to step 11 does modify the Karma configuration, https://github.com/angular/angular-phonecat/compare/step-10...step-11, the explanation says nothing about it, and the tests will all fail precisely because of a failure to load ngResource for no apparent reason until the module is explicitly made available to Karma through the steps described in this pull request.

Feel free to adapt the wording to whatever may be more appropriate, but the extra instructions added in this pull request seem to be absolutely indispensable to get all tests in the green again.

An alternative, of course, is to simply ship a ```karma.conf.js``` with ```angular-resource.js``` already loaded in an updated source package, and sidestep this whole problem that arises in step 11 from the start.