You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prototype: Textends{prototype: any} ? Mocked<T['prototype']> : never
}&T
But I think MockInstance<A, R> which is primarily SpyInstance<TArgs, TReturns> is a kind of mock new (...Targs)=>TReturns, should MockedClass<T> be MockInstance<ConstructorArgs<T>, InstanceType<T>> instead of MockInstance<InstanceType<T>, ConstructorArgs<T>>?
Describe the bug
The primary part of
MockedClass<T>
isMockInstance<InstanceType<T>, ConstructorArgs<T>>
vitest/packages/vitest/src/integrations/spy.ts
Lines 101 to 106 in 34b06db
But I think
MockInstance<A, R>
which is primarilySpyInstance<TArgs, TReturns>
is a kind of mocknew (...Targs)=>TReturns
, shouldMockedClass<T>
beMockInstance<ConstructorArgs<T>, InstanceType<T>>
instead ofMockInstance<InstanceType<T>, ConstructorArgs<T>>
?vitest/packages/vitest/src/integrations/spy.ts
Lines 39 to 56 in 34b06db
vitest/packages/vitest/src/integrations/spy.ts
Line 58 in 34b06db
Reproduction
n/a
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: