Staging Test Error :( #181
Answered
by
PatrickAlphaC
himanshuGoyal52
asked this question in
Q&A
-
In staging test when i am running its show this error
Full Error is
The FundMe.staging.test.js code is same the patrick code const { deployments, ethers, getNamedAccounts, network } = require("hardhat");
const { assert } = require("chai");
const { developmentChains } = require("../../helper-hardhat-config");
developmentChains.includes(network.name)
? describe.skip
: describe("FundMe Staging Tests", async () => {
let fundMe;
let deployer;
const sendValue = ethers.utils.parseEther("0.03"); // 1 ETH
beforeEach(async function () {
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 endingBalance = await fundMe.provider.getBalance(
fundMe.address
);
assert.equal(endingBalance.toString(),"0");
})
}); |
Beta Was this translation helpful? Give feedback.
Answered by
PatrickAlphaC
Jun 8, 2022
Replies: 1 comment 1 reply
-
Remember to check the
It's located on that first line:
Your sendvalue is too low: const sendValue = ethers.utils.parseEther("0.03"); // 1 ETH The const sendValue = ethers.utils.parseEther("0.045"); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
PatrickAlphaC
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Remember to check the
reason
flag in your error code! You'd see this line:It's located on that first line: