Replies: 1 comment
-
Try this. 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.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
my code is:
the command im using:
the errorr im getting:
Beta Was this translation helpful? Give feedback.
All reactions