mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Update sinon-test definitions (#36558)
This commit is contained in:
parent
b7c2c7b4f2
commit
857eaaa323
12
types/sinon-test/index.d.ts
vendored
12
types/sinon-test/index.d.ts
vendored
@ -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;
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user