Skip to content

One loop causes problem, other runs fine #425

Discussion options

You must be logged in to vote
    it("Should allow us withdraw with multiple funders", async () => {  // This assertion is failing
      const accounts = await ethers.getSigners();
      accounts.slice(1).forEach(async (acc) => {
        const fundMeConnectedContract = fundMe.connect(acc);
        await fundMeConnectedContract.fund({ value: ehtAmount });
     });

Try doing this because in your previous code you are not calling fund function with connected account.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Muhammad-Abdullah012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants