Lesson 7: AssertionError: Expected transaction to be reverted, but other exception was thrown SOLUTION #1018
SebasAran16
started this conversation in
Show and tell
Replies: 1 comment
-
Thank you so much man. Thanks to your comment i resolved my issue. Great job!! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hiiii!
I just wanted to let you know something I discovered and would love it to help someone that has the same issue.
I had troubles testing the withdraw with multiple funders due the revert call (
await expect(fundMe.funders(0)).to.be.reverted;
, I always got the error:AssertionError: Expected transaction to be reverted, but other exception was thrown: RangeError: Maximum call stack size exceeded
. So I checked what the RangeError was and is replied here: https://stackoverflow.com/questions/6095530/maximum-call-stack-size-exceeded-error .So it was some trouble comunicating with the Solidity function so I changed the line of code with:
await expect(fundMe.funders({ value: 0 })).to.be.reverted;
and it nows works perfectly. As I dont know much about JS I would love some explanation of the comunication between both languages here, I just thought about it because I had some similar issue when writing into Solidity getters from JS.Thanks! And I really hope I can help someone with this. :)
Beta Was this translation helpful? Give feedback.
All reactions