diff --git a/types/sinon/index.d.ts b/types/sinon/index.d.ts index 5d3288068d..dda76478c8 100644 --- a/types/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Sinon 4.1 +// Type definitions for Sinon 4.3 // Project: http://sinonjs.org/ // Definitions by: William Sears // Jonathan Little @@ -26,6 +26,8 @@ declare namespace Sinon { calledOn(obj: any): boolean; calledWith(...args: any[]): boolean; calledWithExactly(...args: any[]): boolean; + calledOnceWith(...args: any[]): boolean; + calledOnceWithExactly(...args: any[]): boolean; calledWithMatch(...args: any[]): boolean; notCalledWith(...args: any[]): boolean; notCalledWithMatch(...args: any[]): boolean; diff --git a/types/sinon/sinon-tests.ts b/types/sinon/sinon-tests.ts index 6ce2254596..702af56820 100644 --- a/types/sinon/sinon-tests.ts +++ b/types/sinon/sinon-tests.ts @@ -85,6 +85,8 @@ function testNine() { callback.alwaysCalledWithMatch({ y: 5 }); callback.neverCalledWithMatch({ x: 6 }); callback.notCalledWithMatch({ x: 6 }); + callback.calledOnceWith({ x: 5, y: 5 }); + callback.calledOnceWithExactly({ x: 5, y: 5 }); sinon.assert.calledWithMatch(callback, { x: 5 }); sinon.assert.alwaysCalledWithMatch(callback, { y: 5 }); sinon.assert.neverCalledWithMatch(callback, { x: 6 });