Closed oxd3v closed 1 year ago
code in test folder
// const accounts = await ethers.getSigners() // deployer = accounts[0] const deployer = (await getNamedAccounts()).deployer await deployments.fixture(["all"]) fundMe = await ethers.getContract("FundMe", deployer) mockV3Aggregator = await ethers.getContract( "MockV3Aggregator", deployer ) }) describe("constructor", function () { it("sets the aggregator addresses correctly", async () => { const response = await fundMe.getPriceFeed() assert.equal(response, mockV3Aggregator.address) }) })``` getting error ``` fundMe constructor 1) "before each" hook for "sets the aggregator addresses correctly" 0 passing (5s) 1 failing 1) fundMe "before each" hook for "sets the aggregator addresses correctly": ERROR processing C:\Users\mdist\hh-fcc-fundme\deploy\sample.js: TypeError: fundMe.priceFeed is not a functionhave ``` anyone have idea?
Hi Md-Istiak, I got the same issue here. using this await fundMe.priceFeed(); solved the issue.
i had solve it .there was a mistrake in fund.sol file. thank you
code in test folder