Back to Sinon

spy.calledWithMatchMatch

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

22.1.0590 B
Original Source

spy.calledWithMatch

Returns true, when the fake, spy or stub was called with matching arguments (and possibly others).

This behaves the same as spy.calledWith(sinon.match(arg1), sinon.match(arg2), ...).

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

Resetting calledWithMatch to default

You can reset calledWithMatch in three different ways: