lesson- 7 AssertionError: Expected transaction to be reverted with reason #1850
-
const { getNamedAccounts, deployments, ethers } = require("hardhat") const { assert, expect } = require("chai")
})
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
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 |
Beta Was this translation helpful? Give feedback.
-
Try @othaime-en 's solution, if it does not fix it reply w/ the repo. I will look into it. |
Beta Was this translation helpful? Give feedback.
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"