mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 19:51:53 +00:00
[sinon] properly type sinon.createStubInstance (#13522)
This commit is contained in:
Vendored
+1
-1
@@ -427,7 +427,7 @@ declare namespace Sinon {
|
||||
|
||||
// Utility overridables
|
||||
interface SinonStatic {
|
||||
createStubInstance(constructor: any): SinonStub;
|
||||
createStubInstance(constructor: any): any;
|
||||
format(obj: any): string;
|
||||
log(message: string): void;
|
||||
restore(object: any): void;
|
||||
|
||||
@@ -114,4 +114,8 @@ var clock = sinon.useFakeTimers();
|
||||
clock.setSystemTime(1000);
|
||||
clock.setSystemTime(new Date());
|
||||
|
||||
class TestCreateStubInstance {
|
||||
someTestMethod(testArg : string) {};
|
||||
}
|
||||
|
||||
sinon.createStubInstance(TestCreateStubInstance).someTestMethod('some argument');
|
||||
|
||||
Reference in New Issue
Block a user