-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
debt: deprecate testFail*
#4437
Comments
@gakonst We should probably just remove @rafales In the meantime I'd suggest following the naming conventions in https://book.getfoundry.sh/tutorials/best-practices, which are |
We can prefer to use |
testFailXXX
test doesn't failtestFail*
prefix
Related: foundry-rs/book#813 |
testFail*
prefixtestFail
Renamed the title, we are intending to deprecate |
Component
Forge
Describe the feature you would like
Hey. I just ran into a problem that wasted more time that I'm willing to admit.
Foundry has a feature where tests named
testFailSomething
are expected to fail. It's easy to forget about it.So I found myself in a situation where test is failing for some unknown reason and all I get is this message:
It would be good if this particular failure had a more user-friendly message, pointing to the reason behind the failure. It's easy to come up with a test name like
testFailsWhenCalledContractFailed
and not know about thetestFailXXX
feature.Message like
FAIL. Reason: test was expected to revert, but it did not.
or something similar.Additional context
No response
The text was updated successfully, but these errors were encountered: