-
Notifications
You must be signed in to change notification settings - Fork 119
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
mockIf does not accept typing given in documentation. #220
Comments
Same problem here, I tried converting the callback to an async function, but now the tests just fail with it telling me to wrap in
|
I ran into the same problem. A quick fix for anyone else that needs it, independent of this library:
And because it's a spyOn, the changes go away when you call |
Hi, sad to see that this issue exists since about 9 months and no fix since then (the proposal by @hak33m16 is nice, however I included this library to not having to do everything manually). |
I also ran into this, just for reference the following typing does work:
|
The example usage given for
mockIf
isHowever when this is attempted in a TypeScript project it results in a Type error.
To give a simpler example
results in
The text was updated successfully, but these errors were encountered: