Lesson 7: 11:20:38 -> TypeError: ethers.getContract is not a function #305
-
I was getting this error when runinning test for fundMe() around 11:20:38 of the video
After some research it seemed that the issue could ber esolved by downloading @nomicslabs/hardhat-waffle from hardhat docs But after running the install I now get the following error running the above test
Any ideas of what could be the issue here? thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Now test 1 passes but test returns the following error when it gets to ERROR:
|
Beta Was this translation helpful? Give feedback.
-
@gmluqa Thank you so much for taking the time to share your answer. Your solution worked. I tried to modify the line so it reads like yours Both tests seem to pass that way as you can see below So it is definitely the line but I still don't understand why adding the string causes the error, maybe I am missing a parameter or an import. |
Beta Was this translation helpful? Give feedback.
-
As @PatrickAlphaC said, here is a cannonical answer seperated from the reply section. Error fixed by adding |
Beta Was this translation helpful? Give feedback.
As @PatrickAlphaC said, here is a cannonical answer seperated from the reply section.
Error fixed by adding
await expect(fundMe.fund()).to.be.reverted
instead of previous code although still are figuring out why it can't work without.revertedWith("error");