Lesson 7: Getting error in running hardhat fundMe test #6238
-
If I run
My FundMe.test.js file: const { deployments, ethers, getNamedAccounts } = require("hardhat"); // runtime environment..
const { assert } = require("chai");
describe("FundMe", async function () {
let fundMe;
let deployer;
let mockV3Aggregator;
beforeEach(async function () {
deployer = (await getNamedAccounts()).deployer;
await deployments.fixture(["all"]);
fundMe = await ethers.getContract("FundMe", deployer);
mockV3Aggregator = await ethers.getContract(
"MockV3Aggregator",
deployer
);
});
describe("constructor", async function () {
it("sets the aggregator addresses correctly", async function () {
const response = await fundMe.priceFeed();
assert.equal(response, mockV3Aggregator.address);
});
});
}); My code repo: |
Beta Was this translation helpful? Give feedback.
Answered by
Aideepakchaudhary
Oct 20, 2023
Replies: 1 comment
-
Solved! I need to run this command:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Aideepakchaudhary
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solved!
I need to run this command: