Skip to content

Suggestion: Support t.throws(..., ..., message?: string | RegExp | undefined) #1102

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
unional opened this issue Nov 3, 2016 · 1 comment

Comments

@unional
Copy link

unional commented Nov 3, 2016

ava version: 0.16.0

So that we can validate both the Error type and use RegExp to check for the message.

Currently, error type checking with RegExp is not possible: t.throws(..., /filter err messge/)

🌷

@sindresorhus
Copy link
Member

t.throws is already too overloaded. We're not gonna make it even harder to use.

We're planning to simplify it over in #1047. Could use your thoughts there ;)

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

No branches or pull requests

2 participants