Skip to content

ISSUE IN CHAP-7 UNIT TESTING CODE #2402

Discussion options

You must be logged in to vote

The problem is,

 let fundMe
    let deployer
    let mockV3Aggregator
    var Address
    const SendValue = ethers.utils.parseEther("1") //helps to convert to ethers
    beforeEach(async function () {
        //deploy our fundme contract
        //using Hardhat - deploy

        // const accounts = await ethers.getSigners()
        const deployer = (await getNamedAccounts()).deployer
        await deployments.fixture(["all"])
        fundMe = await ethers.getContract("FundMe", deployer)
        mockV3Aggregator = await ethers.getContract(
            "MockV3Aggregator",
            deployer
        )
    })

here you declare the deployer 2 times on with this line let deployer and later here

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@soumalya340
Comment options

@othaime-en
Comment options

Comment options

You must be logged in to vote
3 replies
@alymurtazamemon
Comment options

@alymurtazamemon
Comment options

@soumalya340
Comment options

Comment options

You must be logged in to vote
2 replies
@soumalya340
Comment options

@adityabhattad2021
Comment options

Answer selected by soumalya340
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants