-
Notifications
You must be signed in to change notification settings - Fork 632
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
BREAKING(testing): Renaming assertThrowsAsync to assertRejects #1101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd have to apply this to all modules in the entire std library for the tests to pass.
But this hasn't been discussed yet, as you can see in the unlabelled issue you linked.
Probably the way we'd want to go forward is to keep exporting the old alias with deprecated annotations for a couple of releases as this is used a lot on the wild, including in CLI unit tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Casper, also I'd suggest to replace all usages of assertThrowsAsync
in the code in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@getspooky Thank you for your contribution! @caspervonb Thank you for the original suggestion! |
The name
assertThrowsAsync
is overly long and verbose, yet it doesn't describe what it actually asserts which is that a promise rejects. RenameassertThrowsAsync
->assertRejects
.Please see: #1073