From a9ea142716c094ef3c432ecc4089f8207b8dd8b6 Mon Sep 17 00:00:00 2001 From: Mathias Schreck Date: Tue, 25 Jan 2022 16:35:11 +0100 Subject: [PATCH] Add documentation for assert.calledOnceWithMatch (#2424) --- docs/release-source/release/assertions.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/release-source/release/assertions.md b/docs/release-source/release/assertions.md index acf4a9b60..ace751ad5 100644 --- a/docs/release-source/release/assertions.md +++ b/docs/release-source/release/assertions.md @@ -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.