mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Fix sinon-chai "always" language chain
This commit is contained in:
@@ -16,17 +16,17 @@ function test() {
|
||||
expect(spy).to.have.been.calledBefore(anotherSpy);
|
||||
expect(spy).to.have.been.calledAfter(anotherSpy);
|
||||
expect(spy).to.have.been.calledWithNew;
|
||||
expect(spy).to.have.been.alwaysCalledWithNew;
|
||||
expect(spy).to.always.have.been.calledWithNew;
|
||||
expect(spy).to.have.been.calledOn(context);
|
||||
expect(spy).to.have.been.alwaysCalledOn(context);
|
||||
expect(spy).to.always.have.been.calledOn(context);
|
||||
expect(spy).to.have.been.calledWith('foo', 'bar');
|
||||
expect(spy).to.have.been.alwaysCalledWith('foo', 'bar');
|
||||
expect(spy).to.always.have.been.calledWith('foo', 'bar');
|
||||
expect(spy).to.have.been.calledWithExactly('foo', 'bar');
|
||||
expect(spy).to.have.been.alwaysCalledWithExactly('foo', 'bar');
|
||||
expect(spy).to.always.have.been.calledWithExactly('foo', 'bar');
|
||||
expect(spy).to.have.been.calledWithMatch(match);
|
||||
expect(spy).to.have.been.alwaysCalledWithMatch(match);
|
||||
expect(spy).to.always.have.been.calledWithMatch(match);
|
||||
expect(spy).to.have.returned(1);
|
||||
expect(spy).to.have.alwaysReturned(1);
|
||||
expect(spy).threw('an error');
|
||||
expect(spy).alwaysThrew('an error');
|
||||
expect(spy).to.have.always.returned(1);
|
||||
expect(spy).to.have.thrown('an error');
|
||||
expect(spy).to.have.always.thrown('an error');
|
||||
}
|
||||
|
||||
Vendored
+5
-8
@@ -14,18 +14,15 @@ declare module chai {
|
||||
calledBefore(spy: Function): Expect;
|
||||
calledAfter(spy: Function): Expect;
|
||||
calledWithNew: Expect;
|
||||
alwaysCalledWithNew: Expect;
|
||||
calledOn(context: any): Expect;
|
||||
alwaysCalledOn(context: any): Expect;
|
||||
calledWith(...args: any[]): Expect;
|
||||
alwaysCalledWith(...args: any[]): Expect;
|
||||
calledWithExactly(...args: any[]): Expect;
|
||||
alwaysCalledWithExactly(...args: any[]): Expect;
|
||||
calledWithMatch(...args: any[]): Expect;
|
||||
alwaysCalledWithMatch(...args: any[]): Expect;
|
||||
returned(returnVal: any): Expect;
|
||||
alwaysReturned(returnVal: any): Expect;
|
||||
threw(errorObjOrErrorTypeStringOrNothing: any): Expect;
|
||||
alwaysThrew(errorObjOrErrorTypeStringOrNothing: any): Expect;
|
||||
thrown(errorObjOrErrorTypeStringOrNothing: any): Expect;
|
||||
}
|
||||
|
||||
interface LanguageChains {
|
||||
always: Expect;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user