diff --git a/types/sinon/index.d.ts b/types/sinon/index.d.ts index 95dded91e5..5587b7c931 100644 --- a/types/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -524,7 +524,7 @@ declare namespace Sinon { * Makes the stub call the provided @param func when invoked. * @param func */ - callsFake(func: () => TReturnValue): SinonStub; + callsFake(func: (...args: any[]) => TReturnValue): SinonStub; /** * Replaces a new getter for this stub. */ diff --git a/types/sinon/sinon-tests.ts b/types/sinon/sinon-tests.ts index 8ae53c7d8e..cb903c1a7b 100644 --- a/types/sinon/sinon-tests.ts +++ b/types/sinon/sinon-tests.ts @@ -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);