blob: 821ad7b87964b68a1bc4ce825533ac7293e63da3 (
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($provide){
$provide.factory('$exceptionHandler', $exceptionHandlerFactory);
$provide.value('$log', $logMock);
},
function($log, $exceptionHandler) {
$log.error.rethrow = false;
$exceptionHandler('myError');
expect($log.error.logs.shift()).toEqual(['myError']);
}
));
});
|