diff --git a/types/sinon-test/index.d.ts b/types/sinon-test/index.d.ts index 902064a7cb..1c2157cd76 100644 --- a/types/sinon-test/index.d.ts +++ b/types/sinon-test/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for sinon-test 1.0 +// Type definitions for sinon-test 2.4 // Project: https://github.com/sinonjs/sinon-test // Definitions by: Francis Saul // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -9,16 +9,14 @@ import * as Sinon from 'sinon'; interface Configuration { injectIntoThis?: boolean; injectInto?: any; - properties?: Array<"spy"| "stub"| "mock"| "clock"| "server"| "requests">; + properties?: Array<"spy" | "stub" | "mock" | "clock" | "server" | "requests">; useFakeTimers?: boolean; useFakeServer?: boolean; } -interface sinonTest { - configureTest(sinon: Sinon.SinonStatic, config?: Configuration): any; - configureTestCase(sinon: Sinon.SinonStatic, config?: Configuration): any; +declare function sinonTest(sinon: Sinon.SinonStatic, config?: Configuration): any; +declare namespace sinonTest { + function configureTest(sinon: Sinon.SinonStatic, config?: Configuration): any; } -declare var sinonTest: sinonTest; - export = sinonTest; diff --git a/types/sinon-test/sinon-test-tests.ts b/types/sinon-test/sinon-test-tests.ts index 83f7e5c65c..90b61f9538 100644 --- a/types/sinon-test/sinon-test-tests.ts +++ b/types/sinon-test/sinon-test-tests.ts @@ -11,15 +11,4 @@ function testConfigure() { }); } -function testConfigureTestCase() { - const test = sinonTest.configureTestCase(sinon, { - injectIntoThis: true, - injectInto: true, - properties: ["spy", "stub", "mock", "clock", "server", "requests"], - useFakeTimers: true, - useFakeServer: true - }); -} - testConfigure(); -testConfigureTestCase(); diff --git a/types/sinon-test/tsconfig.json b/types/sinon-test/tsconfig.json index d4b45dfb80..47e0e148c0 100644 --- a/types/sinon-test/tsconfig.json +++ b/types/sinon-test/tsconfig.json @@ -6,8 +6,8 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": true, "strictFunctionTypes": true, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -20,4 +20,4 @@ "index.d.ts", "sinon-test-tests.ts" ] -} \ No newline at end of file +}