mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 11:02:11 +08:00
Add onCall(n) and friends to SinonStub definition
These were added in Sinon 1.8, and the definition claims to be Sinon 1.8.1 From documentation: "As of Sinon version 1.8, you can use the onCall method to make a stub respond differently on consecutive calls." http://sinonjs.org/docs/
This commit is contained in:
4
sinon/sinon.d.ts
vendored
4
sinon/sinon.d.ts
vendored
@@ -101,6 +101,10 @@ interface SinonStub extends SinonSpy {
|
||||
callsArgOnAsync(index: number, context: any): SinonStub;
|
||||
callsArgWithAsync(index: number, ...args: any[]): SinonStub;
|
||||
callsArgOnWithAsync(index: number, context: any, ...args: any[]): SinonStub;
|
||||
onCall(n: number): SinonStub;
|
||||
onFirstCall(): SinonStub;
|
||||
onSecondCall(): SinonStub;
|
||||
onThirdCall(): SinonStub;
|
||||
yields(...args: any[]): SinonStub;
|
||||
yieldsOn(context: any, ...args: any[]): SinonStub;
|
||||
yieldsTo(property: string, ...args: any[]): SinonStub;
|
||||
|
||||
Reference in New Issue
Block a user