Asserts that a node.js-style asynchronous function taking a single callback will call it.
If the callback is never called, it will hang until your test framework marks it as timed out. So the assertion itself only ever fails if the function throws an exception synchronously:
The assertion will pass even if the function passes an error to the callback. If you want that case to fail, look into the to call the callback without assertion.
If you want the parameters passed to the callback to be the subject of further assertions, you might be able to use the when passed as parameters to assertion.
The parameters passed to the callback are also provided as the value of the returned promise, so you can do further assertions like this:
Or using the Bluebird-specific .spread
extension: