mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-11 12:40:15 +00:00
Fix wrong test
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/33223/files#r261413058
This commit is contained in:
2
types/sinon/ts3.1/index.d.ts
vendored
2
types/sinon/ts3.1/index.d.ts
vendored
@@ -1725,7 +1725,7 @@ declare namespace Sinon {
|
||||
createStubInstance<TType>(
|
||||
constructor: StubbableType<TType>,
|
||||
overrides?: { [K in keyof TType]?:
|
||||
SinonStubbedMember<TType[K]> | TType[K] extends (...args: any[]) => infer R ? R : TType[K] }
|
||||
SinonStubbedMember<TType[K]> | (TType[K] extends (...args: any[]) => infer R ? R : TType[K]) }
|
||||
): SinonStubbedInstance<TType>;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,9 +89,12 @@ function testSandbox() {
|
||||
const clsBar: number = stubInstance.bar;
|
||||
const privateFooBar: number = privateFooStubbedInstance.bar;
|
||||
sb.createStubInstance(cls, {
|
||||
foo: (arg1: string, arg2: number) => 2,
|
||||
foo: sinon.stub<[string, number], number>().returns(1),
|
||||
bar: 1
|
||||
});
|
||||
sb.createStubInstance(cls, {
|
||||
foo: 1, // used as return value
|
||||
});
|
||||
}
|
||||
|
||||
function testFakeServer() {
|
||||
|
||||
Reference in New Issue
Block a user