Skip to content

AssertionError: Expected transaction to be reverted with reason 'Raffle__NotEnoughEthEntered', but it reverted with a custom error #2702

Answered by othaime-en
kihiuFrank asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @kihiuFrank try and use to.be.revertedWithCustomError() instead and see if it works.
The line should read something like this

await expect(raffle.enterRaffle()).to.be.revertedWithCustomError(raffle, "Raffle__NotEnoughEthEntered")

Replies: 2 comments 13 replies

Comment options

You must be logged in to vote
10 replies
@kihiuFrank
Comment options

@alymurtazamemon
Comment options

@kihiuFrank
Comment options

@krakxn
Comment options

@alymurtazamemon
Comment options

Comment options

You must be logged in to vote
3 replies
@kihiuFrank
Comment options

@othaime-en
Comment options

@rbansode
Comment options

Answer selected by alymurtazamemon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants