Back to Sinon

stub.yieldsOnAsync

docs/concepts/stubs/api/yields-on-async.md

22.1.01.2 KB
Original Source

stub.yieldsOnAsync()

Causes the stub to call the first callback it receives with any provided arguments, with an additional parameter to pass the this context, asynchronously.

<<< ../../../.vitepress/tests/docs/stubs/api/yields-on-async.test.js

Errors

When the argument at the provided index is undefined, or not a function, an Error will be thrown.

See also

More information