Improve this doc View Source

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`.

## Methods

- ###

  `reset();`

  Reset all of the logging arrays to empty.

- ###

  `assertEmpty();`

  Assert that the all of the logging methods have no logged messages. If messages present, an exception is thrown.

## Properties

- ### `log.logs`

  | Array of messages logged using `$log`.

- ### `info.logs`

  | Array of messages logged using `$log`.

- ### `warn.logs`

  | Array of messages logged using `$log`.

- ### `error.logs`

  | Array of messages logged using `$log`.

- ### `debug.logs`

  | Array of messages logged using `$log`.