Skip to content

Disallow null expectations for throws and throwsAsync assertions #2422

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
wants to merge 1 commit into from

Conversation

TokenStyle
Copy link

@TokenStyle TokenStyle commented Mar 12, 2020

Fixes #2410

Second argument called expectation (in the documentation) of the throws and throwsAsync functions, in this change cannot be assigned as null (but can be assigned as undefined).
Also in the error throw message, I changed the text of message, removed null as one of the options for the expectation argument.

@novemberborn
Copy link
Member

Thanks for the PR @TokenStyle.

Per #2410, this needs to be behind a flag:

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.

@novemberborn
Copy link
Member

Closing due to inactivity. We'd be happy to pick this up again when you have the time to get back to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disallow null expectations for throws and throwsAsync assertions
2 participants