Skip to content

lesson- 7 AssertionError: Expected transaction to be reverted with reason #1850

Answered by othaime-en
TimeKeyRoll asked this question in Q&A
Discussion options

You must be logged in to vote

You get this error because the revert message in your fundMe.sol fund function is different from the "you need to spend more eth" message you have included in your test.

To fix this, replace "you need to spend more eth" with the message "not enough funds"

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@TimeKeyRoll
Comment options

@Srinivas-559
Comment options

Answer selected by TimeKeyRoll
Comment options

You must be logged in to vote
1 reply
@TimeKeyRoll
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants