We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
t.notThrows()
It's an easy mistake to make if you have many t.throws() statements and then some t.notThrows() statements.
t.throws()
For example: sindresorhus/p-queue@80e8e25
// Fail t.notThrows(() => { t.pass(); }, TypeError); // Ok t.notThrows(() => { t.pass(); });
It should fail if it's a variable matching this regex: /^(?:[A-Z][a-z0-9]*)*Error$/
/^(?:[A-Z][a-z0-9]*)*Error$/
prevent-errortype
no-error-ctor-with-notthrows
The text was updated successfully, but these errors were encountered:
@novemberborn In AVA, I think we should assert it's a string or undefined at runtime. What do you think?
Sorry, something went wrong.
@sindresorhus avajs/ava#1125
@IssueHunt has funded $60.00 to this issue.
@sindresorhus @novemberborn I tried to give it a shot please review and guide further. #240
Successfully merging a pull request may close this issue.
It's an easy mistake to make if you have many
t.throws()
statements and then somet.notThrows()
statements.For example: sindresorhus/p-queue@80e8e25
It should fail if it's a variable matching this regex:
/^(?:[A-Z][a-z0-9]*)*Error$/
IssueHunt Summary
Backers (Total: $60.00)
Submitted pull Requests
prevent-errortype
no-error-ctor-with-notthrows
ruleBecome a backer now!
Or submit a pull request to get the deposits!
Tips
The text was updated successfully, but these errors were encountered: