/
githubmirror
/
angular.js
Обзор
Документация
Войти
/
githubmirror
/
angular.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v1.7.7
test/ng/exceptionHandlerSpec.js
25 строк
796 B
Henry Zhu
style(*): add rule requireSpacesInFunction beforeOpeningCurlyBrace
23 окт 2014, 23:59
23 окт 2014, 23:59
7f65f97
Код
Авторство
О чём код?
'use strict'; describe('$exceptionHandler', function() { /* global $ExceptionHandlerProvider:false */ it('should log errors with single argument', function() { module(function($provide) { $provide.provider('$exceptionHandler', $ExceptionHandlerProvider); }); inject(function($log, $exceptionHandler) { $exceptionHandler('myError'); expect($log.error.logs.shift()).toEqual(['myError']); }); }); it('should log errors with multiple arguments', function() { module(function($provide) { $provide.provider('$exceptionHandler', $ExceptionHandlerProvider); }); inject(function($log, $exceptionHandler) { $exceptionHandler('myError', 'comment'); expect($log.error.logs.shift()).toEqual(['myError', 'comment']); }); }); });