Back to Sinon

Matchers

docs/concepts/matchers/index.md

22.1.0684 B
Original Source

Matchers

Introduction

Matchers can be passed as arguments to spy.calledOn, spy.calledWith, spy.returned and the corresponding sinon.assert functions as well as spy.withArgs. Matchers allow to be either more fuzzy or more specific about the expected value.

<<< @/.vitepress/tests/docs/matchers/_index-1.test.js

<<< @/.vitepress/tests/docs/matchers/_index-2.test.js