Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Karma also needs to be told about ngResource #7575

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/content/tutorial/step_11.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,19 @@ describe('PhoneCat controllers', function() {
});
```

You should now see the following output in the Karma tab:
For our modified tests to work, however, Karma also has to be told to load the `angular-resource.js` file,
so that the {@link api/ngResource ngResource} module becomes available to the testing framework.

__`test/karma.conf.js`:__
```js
...
'app/bower_components/angular-route/angular-route.js',
'app/bower_components/angular-resource/angular-resource.js',
'app/bower_components/angular-mocks/angular-mocks.js',
...
```

Once Karma has been restarted through ```npm test```, you should now see the following output in the Karma tab:

<pre>Chrome 22.0: Executed 4 of 4 SUCCESS (0.038 secs / 0.01 secs)</pre>

Expand Down