PatrickAlphaC / hardhat-smartcontract-lottery-fcc

MIT License
117 stars 183 forks source link

TypeError: no matching function (argument="key", value="provider", code=INVALID_ARGUMENT, version=6.6.4) #180

Closed rezowansifat closed 11 months ago

rezowansifat commented 11 months ago

Hi, I was wondering if anyone could help, with this error.

1) Raffle Unit Tests enterRaffle emits event on enter: TypeError: no matching function (argument="key", value="provider", code=INVALID_ARGUMENT, version=6.6.4)

` describe("enterRaffle", () => { it("reverts when you don't pay enough", async () => { await expect(raffle.enterRaffle()).to.be.revertedWith( "Raffle__SendMoreToEnterRaffle", ) })

          it("records players when theya enter", async () => {
              await raffle.enterRaffle({ value: raffleEntranceFee })
              const contractPlayer = await raffle.getPlayer(0)
              assert.equal(player.address, contractPlayer)
          })

          it("emits event on enter", async () => {
              await expect(raffle.enterRaffle({ value: raffleEntranceFee })).to.emit(
                  raffle,
                  "RaffleEnter",
              )
          })
      })`

my repo: https://github.com/rezowansifat/Decentralized-Lottery.git

PatrickAlphaC commented 11 months ago

Can you:

  1. Make this a discusson on the full repo? https://github.com/smartcontractkit/full-blockchain-solidity-course-js/
  2. Follow this section for formatting questions? https://www.youtube.com/watch?t=19846&v=gyMwXuJrbJQ&feature=youtu.be