mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-01-13 08:59:54 +08:00
This rule enforces a space after the curly brace for function declarations, anonymous function expressions, and named function expressions.
26 lines
796 B
JavaScript
26 lines
796 B
JavaScript
'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']);
|
|
});
|
|
});
|
|
});
|