Lesson 07: getting 0 passing on running yarn hardhat test --grep "Withdraw ETH" #4603
Answered
by
alymurtazamemon
umairahmed88
asked this question in
Q&A
-
My code is describe("withdraw", function () {
beforeEach(async function () {
await fundMe.fund({ value: sendValue });
});
it("withdraw ETH from a single funder", async function () {
const startingFundMeBalance = await fundMe.provider.getBalance(
fundMe.address
);
const startingDeployerBalance = await fundMe.provider.getBalance(
deployer
);
const transactionResponse = await fundMe.withdraw();
const transactionReceipt = await transactionResponse.wait(1);
const { gasUsed, effectiveGasPrice } = transactionReceipt;
const gasCost = gasUsed.mul(effectiveGasPrice);
const endingFundMeBalance = await fundMe.provider.getBalance(
fundMe.address
);
const endingDeployerBalance = await fundMe.provider.getBalance(
deployer
);
assert.equal(endingFundMeBalance, 0);
assert.equal(
startingFundMeBalance.add(startingDeployerBalance).toString(),
endingDeployerBalance.add(gasCost).toString()
);
});
}); I am getting by running yarn hardhat test --grep "Withdraw ETH"
$ /home/umair/Projects/Blockchain/hardHat/hardhat-fund-me-fcc/node_modules/.bin/hardhat test --grep 'Withdraw ETH'
0 passing (29ms)
Done in 4.63s. |
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
Jan 26, 2023
Replies: 1 comment 1 reply
-
@umairahmed88 Your withdraw spelling starts with lower case letter. -yarn hardhat test --grep "Withdraw ETH"
+yarn hardhat test --grep "withdraw ETH" |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
umairahmed88
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@umairahmed88 Your withdraw spelling starts with lower case letter.