-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
thenReject needs Type Error breaking change #150
Comments
According to this MS Typescript issue #7588 (If I follow it correctly) reject should support I'm new here, so I might be missing something. Is there a benefit to requiring |
No there isn't any benefit, The restriction came with Version 2.4.0. It would be great to support any as rejection type. @NagRock |
@NagRock any news on this one? |
Since Version 2.4.0 thenReject returns an Error and expecting an Error, but now tests like this are failing if the ErrorEntity is not like the Error (Property 'name' is missing in type 'ErrorEntity' but required in type 'Error'):
Here: https://github.com/NagRock/ts-mockito/blob/v2.4.0/src/MethodStubSetter.ts
Its a really bad way to pretend, that every rejection has to be an Error Object.
The text was updated successfully, but these errors were encountered: