mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-06-17 02:41:49 +08:00
16 lines
371 B
JavaScript
16 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']);
|
|
});
|
|
});
|
|
});
|