Hook.callback
You're seeing just the function
callback
, go back to Hook module for more information.
Link to this function
callback(module, function_name, function, opts \\ [])
Defines a callback that can be consumed and asserted on.
Note: module
will be defined under the calling process.
This function will raise when the specified callback is not a public function on module
.
Options
:count
- How many times the callback can be consumed.
:infinity
- The callback can be consumed an infinite number of times. For a module, function, and arity, only a single infinity-callback will be defined at once, last write wins. Infinity-callbacks are always consumed after non-infinity-callbacks.0
- The callback should never be consumed. Raises an error if it is. The callback is removed upon raising.