Back to Sinon

stub.callArgWith

docs/concepts/stubs/api/call-arg-with.md

22.1.0336 B
Original Source

stub.callArgWith(index, ...)

Invokes a callback passed to the stub at a given index, with given arguments.

Useful when a function is called with more than one callback, and calling the first callback is undesirable.

<<< ../../../.vitepress/tests/docs/stubs/api/call-arg-with.test.js

See also