when called with
- <function> [when] called with <array-like> <assertion?>
Apply the subject function to an array of parameters, then delegate the return value to another assertion.
In case of a failing expectation you get the following output:
If you don't provide an assertion to delegate to, the returned value will be provided as the fulfillment value of the promise: