blob: 3bfb70c0911e1a3aab3508903c251d5d79c2b34d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
'use strict';
describe('$exceptionHandler', function() {
it('should log errors', inject(
function(service){
service('$exceptionHandler', $exceptionHandlerFactory);
service('$log', valueFn($logMock));
},
function($log, $exceptionHandler) {
$log.error.rethrow = false;
$exceptionHandler('myError');
expect($log.error.logs.shift()).toEqual(['myError']);
}
));
});
|