mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
Merge pull request #23881 from Flarna/sinon_add_calledOnceWithExcatly
[sinon] add calledOnceWithExactly() and calledOnceWith() added in 4.3.0
This commit is contained in:
Vendored
+3
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Sinon 4.1
|
||||
// Type definitions for Sinon 4.3
|
||||
// Project: http://sinonjs.org/
|
||||
// Definitions by: William Sears <https://github.com/mrbigdog2u>
|
||||
// Jonathan Little <https://github.com/rationull>
|
||||
@@ -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;
|
||||
|
||||
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user