Skip to content

Commit a9ea142

Browse files
authoredJan 25, 2022
Add documentation for assert.calledOnceWithMatch (#2424)
1 parent 1d5ab86 commit a9ea142

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎docs/release-source/release/assertions.md

+6
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ This behaves the same way as `sinon.assert.calledWith(spy, sinon.match(arg1), si
119119

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

122+
#### `sinon.assert.calledOnceWithMatch(spyOrSpyCall, arg1, arg2, ...)`
123+
124+
Passes if `spy` was called once and only once with matching arguments.
125+
126+
It's possible to assert on a dedicated spy call: `sinon.assert.calledOnceWithMatch(spy.secondCall, arg1, arg2, ...);`.
127+
122128
#### `sinon.assert.alwaysCalledWithMatch(spy, arg1, arg2, ...)`
123129

124130
Passes if `spy` was always called with matching arguments.

0 commit comments

Comments
 (0)
Please sign in to comment.