Replies: 1 comment
-
Hi @monnidev, What is happening is that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have an issue with an old test of mine, I cannot share the code but the test is fairly simple, it checks if an unauthorized user can perform a specific action (in this case, grant a role to themselves):
This test fails:
[FAIL: next call did not revert as expected]
But when I remove
vm.expectRevert();
to check what's going on, it does revert correctly:[FAIL: AccessControlUnauthorizedAccount( user , role )]
My assumption was that the test does revert correctly but that it does so in a way not caught by
vm.expectRevert();
, my workaround at the time was to usetestFail
, unfortunately I cannot do it anymore, can you help me find a way to catch this revert? ThanksBeta Was this translation helpful? Give feedback.
All reactions