Skip to content
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

Feature request: add :to-error matcher #201

Open
diamond-lizard opened this issue Oct 6, 2020 · 1 comment
Open

Feature request: add :to-error matcher #201

diamond-lizard opened this issue Oct 6, 2020 · 1 comment

Comments

@diamond-lizard
Copy link

It would be nice if there was a :to-error matcher.

There's a :to-throw, but that's not quite the same.

There's should-error, but then you're not using the expect function.

For consistency with the other expect matchers, having a :to-error matcher would be appreciated.

@snogge
Copy link
Collaborator

snogge commented Oct 18, 2023

What would :to-error do different from :to-throw?
The name :to-throw is unfortunate, it actually checks for signals raised by signal and error.
I'm considering renaming it to :to-signal, but maybe :to-error would be a better name. Obviously :to-throw would be kept as an alias.
Do we need a matcher to verify expressions that actually throws?

(I realise this answer is 3 years too late, but I'm trying to put in some work on buttercup again.)

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

No branches or pull requests

2 participants