Timeline for Testing Error thrown with hardhat
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 11, 2021 at 9:43 | comment | added | goonerify |
to.be.reverted also works if you don't know the thrown error message
|
|
Jun 23, 2021 at 19:02 | vote | accept | ntonnelier | ||
Jun 23, 2021 at 14:49 | comment | added | Majd TL | okay it works for me without "be", but anyway great accept it as answer please:) | |
S Jun 23, 2021 at 14:48 | history | suggested | ntonnelier | CC BY-SA 4.0 |
matcher was missing "be" keywords
|
Jun 23, 2021 at 14:05 | review | Suggested edits | |||
S Jun 23, 2021 at 14:48 | |||||
Jun 23, 2021 at 14:03 | comment | added | ntonnelier | this made it @Majd TL. Just needed to correct to.revertedWith to to.be.revertedWith. Thanks! | |
Jun 23, 2021 at 13:36 | comment | added | Majd TL | I updated my answer there was an error in the message idk if you noticed it. @ntonnelier | |
Jun 23, 2021 at 13:35 | history | edited | Majd TL | CC BY-SA 4.0 |
wrong error message
|
Jun 23, 2021 at 13:30 | comment | added | Majd TL | and you dont get any error when testing that in remix? | |
Jun 23, 2021 at 13:23 | comment | added | ntonnelier | it's a payable function and it changes data in storage (although after the require that throws the error here). I'm using solidity 0.7 and hardhat 2.3.3 @MajdTL | |
Jun 23, 2021 at 13:14 | comment | added | Majd TL | @ntonnelier which solidity version are you using , and which hardhat version. are you changing a state inside that function or it is just a call data function? | |
Jun 23, 2021 at 11:54 | comment | added | ntonnelier | thanks @Majd TL, but that still crashes the VM. Same error. Btw, not sure I mentioned it, but it's an async function. | |
Jun 23, 2021 at 11:35 | history | answered | Majd TL | CC BY-SA 4.0 |