Skip to content

Can I assert the reason a call is reverted? #1811

Answered by odyslam
AlexDiru asked this question in Help
Discussion options

You must be logged in to vote

vm.expectRevert("revertString");

will make sure to catch require(false, "revertString") or revert("revertString")

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AlexDiru
Comment options

Answer selected by AlexDiru
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants