AngularJS: API: ngMock/service

Service components in ngMock

Name Description

Mock implementation of $exceptionHandler that rethrows or logs errors passed into it. See $exceptionHandlerProvider for configuration information.


Mock implementation of $log that gathers all logged messages in arrays (one array per logging level). These arrays are exposed as logs property of each of the level-specific log function, e.g. for level error the array is exposed as $log.error.logs.


Mock implementation of the $interval service.


Fake HTTP backend implementation suitable for unit testing applications that use the $http service.


This service is just a simple decorator for $timeout service that adds a "flush" and "verifyNoPendingTasks" methods.