angular.js/test/service/exceptionHandlerSpec.js
Igor Minar 1777110958 split up services into individual files
- split up services into files under src/service
- split up specs into files under test/service
- rewrite all specs so that they don't depend on one global forEach
- get rid of obsolete code and tests in ng:switch
- rename mock $log spec from "$log" to "$log mock"
2011-02-15 11:01:53 -05:00

23 lines
545 B
JavaScript

describe('$exceptionHandler', function() {
var scope;
beforeEach(function(){
scope = angular.scope();
});
afterEach(function(){
dealoc(scope);
});
it('should log errors', function(){
var scope = createScope({}, {$exceptionHandler: $exceptionHandlerFactory},
{$log: $logMock}),
$log = scope.$service('$log'),
$exceptionHandler = scope.$service('$exceptionHandler');
$exceptionHandler('myError');
expect($log.error.logs.shift()).toEqual(['myError']);
});
});