Skip to content

Commit

Permalink
Add documentation for assert.calledOnceWithMatch (#2424)
Browse files Browse the repository at this point in the history
  • Loading branch information
lo1tuma authored Jan 25, 2022
1 parent 1d5ab86 commit a9ea142
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/release-source/release/assertions.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ This behaves the same way as `sinon.assert.calledWith(spy, sinon.match(arg1), si

It's possible to assert on a dedicated spy call: `sinon.assert.calledWithMatch(spy.secondCall, arg1, arg2, ...);`.

#### `sinon.assert.calledOnceWithMatch(spyOrSpyCall, arg1, arg2, ...)`

Passes if `spy` was called once and only once with matching arguments.

It's possible to assert on a dedicated spy call: `sinon.assert.calledOnceWithMatch(spy.secondCall, arg1, arg2, ...);`.

#### `sinon.assert.alwaysCalledWithMatch(spy, arg1, arg2, ...)`

Passes if `spy` was always called with matching arguments.
Expand Down

0 comments on commit a9ea142

Please sign in to comment.