Open distante opened 3 years ago
I am not sure if this is an error or a feature request, so I did not trusted my self to do a PR
The definition for reset is:
reset
https://github.com/NagRock/ts-mockito/blob/6637048fdc72b676efcf210bc5be8d432c4ce1b1/src/ts-mockito.ts#L76-L79
That means, that we can just use multiple mocks if they have the same type. Is this the expected behavior? I thought the idea was to be able to do:
const mock1 = mock(MyWonderClass); const mock2 = mock(ThisIsAnotherClass); reset(mock1, mock2)
as workaround one can set the reset as any but this feels dirty
any
reset<any>(mock1, mock2)
This certainly seems like a mistake with the types.
I am not sure if this is an error or a feature request, so I did not trusted my self to do a PR
The definition for
reset
is:https://github.com/NagRock/ts-mockito/blob/6637048fdc72b676efcf210bc5be8d432c4ce1b1/src/ts-mockito.ts#L76-L79
That means, that we can just use multiple mocks if they have the same type. Is this the expected behavior? I thought the idea was to be able to do:
as workaround one can set the reset as
any
but this feels dirty