Skip to content

About the problem in Lesson 9, "Error: Timeout of 20000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. "  #6473

Open
@RMTKroos

Description

@RMTKroos

If using ethers v6,some changes are needed.
Firstly, in ethers v6, getBalance function need use provider,
Change:

const winnerStartingBalance = await accounts[0].getBalance()

To:

const winnerStartingBalance = await ethers.provider.getBalance(accounts[1].address)

furthermore, in v6, the BigNumber class has been replaced with the built-in ES2020
Change:

winnerStartingBalance.add(raffleEntryFee)

To:

winnerStartingBalance + raffleEntryFee

Originally posted by @RMTKroos in #5050 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions