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
It would be nice to have an async equivalent of assert.throws() for promise rejections.
While this can be handled via a workaround, having a separate method does cut down on boilerplate.
Instead of overloading throws, I feel it makes sense to have a separate method for promise rejections. This way throws is always sync and rejects is always async.
I understand if you’d rather just keep throws and the workaround, just wanted to share my addition upstream. Please feel free to close this issue and the pull request if you feel this is out of scope or complicates the API beyond what you’re comfortable with.
The text was updated successfully, but these errors were encountered:
It would be nice to have an async equivalent of
assert.throws()
for promise rejections.While this can be handled via a workaround, having a separate method does cut down on boilerplate.
Instead of overloading
throws
, I feel it makes sense to have a separate method for promise rejections. This waythrows
is always sync andrejects
is always async.I understand if you’d rather just keep
throws
and the workaround, just wanted to share my addition upstream. Please feel free to close this issue and the pull request if you feel this is out of scope or complicates the API beyond what you’re comfortable with.The text was updated successfully, but these errors were encountered: