Lesson 9 - Unit test: Assertion Error for 'Enter Lottery' #5094
-
I have the following error defined in my
The problem is when I try to run the following test defined in
I get the following error: Any suggestions why I am getting this error message? The test for the constructor passes without an issue but for some reason I can't get the defined error messages to be displayed. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
@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. |
Beta Was this translation helpful? Give feedback.
@Basem815 Try this;
If it does not work then please leave the repo so I can test it locally.