You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you do await expect(...something...), the promise returned inside the expect will be captured by Chai. If you then don't assert anything on that promise, then the result will be discarded and the test will pass.
To check that the transaction indeed fails, remove the expect too:
Hi, I've used your boilerplate for a personal project, but I found out that VM revert are not caught correctly.
Reproduce steps :
hardhat-boilerplate/test/Token.js
Lines 101 to 103 in 13bd712
Remove to.be.revertedWith :
Test still passes :
✔ Should fail if sender doesn't have enough tokens
Any idea why ? I found your boilerplate code really useful, too bad I cannot use it
Thanks
The text was updated successfully, but these errors were encountered: