mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
- turn scope into a $rootScope service. - injector is now a starting point for creating angular application. - added inject() method which wraps jasmine its/beforeEach/afterEach, and which allows configuration and injection of services. - refactor tests to use inject() where possible BREAK: - removed angular.scope() method
17 lines
414 B
JavaScript
17 lines
414 B
JavaScript
'use strict';
|
|
|
|
describe('$exceptionHandler', function() {
|
|
|
|
|
|
it('should log errors', inject(
|
|
function(service){
|
|
service('$exceptionHandler', $exceptionHandlerFactory);
|
|
service('$log', valueFn($logMock));
|
|
},
|
|
function($log, $exceptionHandler) {
|
|
$log.error.rethrow = false;
|
|
$exceptionHandler('myError');
|
|
expect($log.error.logs.shift()).toEqual(['myError']);
|
|
}
|
|
));
|
|
});
|