lesson 7: AssertionError: Expected transaction to be reverted with reason 'FundMe__NotOwner', but it reverted with a custom error #4604
Answered
by
alymurtazamemon
umairahmed88
asked this question in
Q&A
-
my code is
I got the error
|
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
Jan 26, 2023
Replies: 1 comment 7 replies
-
@umairahmed88 Use this; await expect(
attackerConnectedContract.withdraw()
).to.be.revertedWithCustomError(fundMe, "FundMe_NotOwner"); |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
umairahmed88
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@umairahmed88 Use this;