This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
throw errors during testing #340
Closed
Description
https://github.com/angular/angular.js/blob/master/src/service/xhr.js#L154
When executing callback (after xhr request), all exceptions are caught and just reported into $log.error().
That's not enough for testing !
Imagine this:
I'm testing controller / service or whatever. And there is xhr request and then, any exception in the callback !
Then the test passes, you have to explicitely check the $log service....
expect(scope.$service('$log).error.logs.length).toBe(0);
Metadata
Metadata
Assignees
Labels
No labels