-
Notifications
You must be signed in to change notification settings - Fork 623
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
Allow for asserting throws on async methods #4384
Conversation
|
You're probably looking for |
Aapo is right. See https://deno.land/std/assert/mod.ts?s=assertRejects Perhaps we should mention the related asynchronous or synchronous function in each of the functions JSDocs. This isn't the first time someone hasn't realised one of these assertion functions exists. |
@mcgear, please see the comments above. |
Sounds good. Let's mention |
This seems to have worked just fine, closing the PR. |
We ran into a use case where we need to be able to assert throws from an async function. I was unable to figure out how to do this with existing assert throws, so added this implementation.