Back to Sinon

stub.yieldsAsync

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

22.1.0712 B
Original Source

stub.yieldsAsync()

Causes the stub to call the first callback it receives with any provided arguments, asynchronously.

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

If a method accepts more than one callback, you need to use yieldsRight to call the last callback or callsArg to have the stub invoke other callbacks than the first or last one.

See also