$log
ngMock
Mock implementation of ng.$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
.
Assert that the all of the logging methods have no logged messages. If messages present, an exception is thrown.
Reset all of the logging arrays to empty.
Array of messages logged using ngMock.$log#debug.
$log.debug('Some Error'); var first = $log.debug.logs.unshift();
Array of messages logged using ngMock.$log#error.
$log.log('Some Error'); var first = $log.error.logs.unshift();
Array of messages logged using ngMock.$log#info.
$log.info('Some Info'); var first = $log.info.logs.unshift();
Array of messages logged using ngMock.$log#log.
$log.log('Some Log'); var first = $log.log.logs.unshift();
Array of messages logged using ngMock.$log#warn.
$log.warn('Some Warning'); var first = $log.warn.logs.unshift();