fix(sinon): stub.callsFake should accept parameters

This commit is contained in:
Justin Beckwith
2018-11-19 14:28:14 -08:00
parent a8323887d0
commit 6337d2eba3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -524,7 +524,7 @@ declare namespace Sinon {
* Makes the stub call the provided @param func when invoked.
* @param func
*/
callsFake(func: () => TReturnValue): SinonStub<TArgs, TReturnValue>;
callsFake(func: (...args: any[]) => TReturnValue): SinonStub<TArgs, TReturnValue>;
/**
* Replaces a new getter for this stub.
*/
+1 -1
View File
@@ -422,7 +422,7 @@ function testStub() {
stub.callsArgOnAsync(1, instance);
stub.callsArgWithAsync(1, 'a', 2);
stub.callsArgOnWithAsync(1, instance, 'a', 2);
stub.callsFake(() => { });
stub.callsFake((s1, s2, s3) => { });
stub.get(() => true);
stub.set((v) => { });
stub.onCall(1).returns(true);