Closed JaysonYator closed 1 year ago
I keep getting this error while running the staging test. Here's my code
const { getNamedAccounts, ethers, network } = require("hardhat"); const { developmentChains } = require("../../helper-hardhat-config"); const { assert } = require("chai"); developmentChains.includes(network.name) ? describe.skip : describe("FundMe", function () { let FundMe; let deployer; const sendValue = ethers.utils.parseEther("1"); beforeEach(async function () { deployer = (await getNamedAccounts()).deployer; FundMe = await ethers.getContract("FundMe", deployer); }); it("Allows people to withdraw", async function () { await FundMe.fund({ value: sendValue }); await FundMe.withdraw(); const endingBalance = awaitFundMe.provider.getBalance(FundMe.address); assert.equal(endingBalance.toString(), 0); }); });
Can you:
I keep getting this error while running the staging test. Here's my code