mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
15 lines
371 B
JavaScript
15 lines
371 B
JavaScript
'use strict';
|
|
|
|
describe('$exceptionHandler', function() {
|
|
|
|
|
|
it('should log errors', function() {
|
|
module(function($provide){
|
|
$provide.service('$exceptionHandler', $ExceptionHandlerProvider);
|
|
});
|
|
inject(function($log, $exceptionHandler) {
|
|
$exceptionHandler('myError');
|
|
expect($log.error.logs.shift()).toEqual(['myError']);
|
|
});
|
|
});
|
|
});
|