Lesson 7 staging Test Errors #1192
-
I'm stuck here with these staging tests error;
This is my FundMe.staging.test.js : const { assert } = require("chai")
const { network, ethers, getNamedAccounts } = require("hardhat")
const { developmentChains } = require("../../helper-hardhat-config")
developmentChains.includes(network.name)
? describe.skip
: describe("FundMe Staging Tests", async function() {
let deployer
let fundMe
const sendValue = ethers.utils.parseEther("0.5")
beforeEach(async () => {
deployer = await getNamedAccounts().deployer
fundMe = await ethers.getContract("FundMe", deployer)
})
it("allows people to fund and withdraw", async function() {
await fundMe.fund({ value: sendValue })
await fundMe.withdraw()
const endingFundMeBalance = await fundMe.provider.getBalance(
fundMe.address
)
console.log(
endingFundMeBalance.toString() +
" should equal 0, running assert equal..."
)
assert.equal(endingFundMeBalance.toString(), "0")
})
}) And yes i have tried lowering my eth value upto 0.1 but it still doesnt work and there is also a second error so im guessing its not just about insufficient funds anyone who can help this error is kinda getting me very frustrated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 38 replies
-
Send hardhat.config |
Beta Was this translation helpful? Give feedback.
-
@bMuhammad506 Did you add the gas parameter in network object? |
Beta Was this translation helpful? Give feedback.
-
The first thing I noticed is this |
Beta Was this translation helpful? Give feedback.
@bMuhammad506 Did you add the gas parameter in network object?