Skip to content

Lesson 9 - Unit test: Assertion Error for 'Enter Lottery' #5094

Answered by alymurtazamemon
Basem815 asked this question in Q&A
Discussion options

You must be logged in to vote

@Basem815 Try this;

await expect(lottery.enterLottery()).to.be.revertedWithCustomError(
    lottery,
    "Lottery__NotEnoughEthEntered"
);

If it does not work then please leave the repo so I can test it locally.

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@Basem815
Comment options

@alymurtazamemon
Comment options

@Basem815
Comment options

@alymurtazamemon
Comment options

@Basem815
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
2 participants