lesson 7 :AssertionError: Expected transaction to be reverted with reason 'You need to spend more ETH', but it didn't revert #6652
Saurabh-0312
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In lesson 7 hardhat fundme i am currently writing the tests for the contract.
while writing test for fund() function in contract i got an error that the transaction is not reverted
### below is the code for test:
code=>
the fund function in my contract is given below:
### the error i am getting is given below:
FundMe
fund
fails if you dont send enough eth:
AssertionError: Expected transaction to be reverted with reason 'You need to spend more ETH', but it didn't revert
at Context. (test/unit/fundme.test.js:26:13)
can any one please give me the solution for the above stated problem............
Beta Was this translation helpful? Give feedback.
All reactions