Skip to content

Disallow null expectations for throws and throwsAsync assertions #2410

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

Closed
novemberborn opened this issue Feb 23, 2020 · 3 comments · Fixed by #2576
Closed

Disallow null expectations for throws and throwsAsync assertions #2410

novemberborn opened this issue Feb 23, 2020 · 3 comments · Fixed by #2576
Assignees
Labels
Milestone

Comments

@novemberborn
Copy link
Member

As a follow-up to #2401, for the next major AVA release we'll remove support for null expectations in throws and throwsAsync assertions. If you want to specify a message without any other expectations you should set it to undefined instead.

This can partially land behind an experimental flag, to be unflagged when the next major is (pre-)released. The the TypeScript definition can only be updated at that point.

@JSimoni42
Copy link
Contributor

Hey @novemberborn, I noticed that the previous PR for this one was closed out and put together a similar fix. I browsed https://github.com/avajs/ava/blob/master/.github/CONTRIBUTING.md and believe that this PR checks all the boxes, but any feedback would be appreciated.

@novemberborn
Copy link
Member Author

Re-opening for the AVA 4 milestone, when we can remove the experimental flag and make this the default behavior.

@novemberborn novemberborn reopened this Sep 9, 2020
@novemberborn novemberborn self-assigned this Sep 9, 2020
@novemberborn novemberborn added this to the 4.0 milestone Sep 9, 2020
@novemberborn
Copy link
Member Author

Plus update the TypeScript definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment