Back to Sinon

spy.calledOnceWith

docs/concepts/spies/api/called-once-with.md

22.1.0522 B
Original Source

spy.calledOnceWith

Returns true, when the fake, spy or stub was called exactly once and that one call was made using the provided arguments.

<<< ../../../.vitepress/tests/docs/spies/api/called-once-with.test.js

Resetting calledOnceWith to default

You can reset calledOnceWith in three different ways: