Update sinon-test definitions (#36558)

This commit is contained in:
James Cote 2019-07-08 21:04:07 -04:00 committed by Armando Aguirre
parent b7c2c7b4f2
commit 857eaaa323
3 changed files with 7 additions and 20 deletions

View File

@ -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 <https://github.com/mummybot>
// 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;

View File

@ -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();

View File

@ -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"
]
}
}