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

Adding custom error messages to Except utils #229

Closed
mortimr opened this issue Nov 7, 2023 · 1 comment
Closed

Adding custom error messages to Except utils #229

mortimr opened this issue Nov 7, 2023 · 1 comment

Comments

@mortimr
Copy link
Contributor

mortimr commented Nov 7, 2023

Hi !

I've been transitioning a test suite to vulcan and the only feature that I'm missing from the forge-std Test contract is the ability to specify a custom error message.
Ex:

assertEq(a, b, "a is not equal to b");

which was a really really nice feature as it really helped identify the exact failing condition

I was wondering if you would be open to extending the Expect utility to also have this feature with something like

expect(a).toEqual(b, "a is not equal to b")

Or something more exotic

because("a should be equal to b").expect(a).toEqual(b);

I could help implementing this, just lmk if it's something you think would fit in this library !

@gnkz
Copy link
Contributor

gnkz commented Nov 8, 2023

Merged: #231

@gnkz gnkz closed this as completed Nov 8, 2023
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