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:
Matt York
2014-06-20 18:35:25 -07:00
parent b2e96a4246
commit d5b8b95a2d

4
sinon/sinon.d.ts vendored
View File

@@ -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;