Replies: 1 comment 1 reply
-
If you're using hardhat v2.22.8 and solidity 0.8.24, try with this one. describe("FundMe", function () {
let fundMe;
let deployer;
let mockV3Aggregator;
beforeEach(async function () {
// deploy FundMe contract using hardhat deploy
// const accounts = await ethers.getSigners();
// const accountZero = accounts[0];
deployer = (await getNamedAccounts()).deployer;
await deployments.fixture(["all"]);
const fundMeDeployment = await deployments.get("FundMe");
fundMe = await ethers.getContractAt(
"FundMe",
fundMeDeployment.address,
deployer
);
const mockV3AggregatorDeployment = await deployments.get(
"MockV3Aggregator"
);
mockV3Aggregator = await ethers.getContractAt(
"MockV3Aggregator",
mockV3AggregatorDeployment.address,
deployer
);
});
describe("constructor", function () {
it("sets the aggregator address correctly", async function () {
const response = fundMe.priceFeed;
assert.equal(response, mockV3Aggregator.address);
});
});
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
this is my FundMe.test.js :
this is the error :
Beta Was this translation helpful? Give feedback.
All reactions