Skip to content

LESSON 9: checkUpkeep test #5509

Answered by HarshDev56
cryptocambi asked this question in Q&A
Discussion options

You must be logged in to vote

@cryptocambi remove this line await raffle.enterRaffle({ value: raffleEntranceFee }) from

  it("returns false if ppl haven't sent any ETH", async function () {
              await raffle.enterRaffle({ value: raffleEntranceFee })
              await network.provider.send("evm_increaseTime", [interval.toNumber() + 1])
              await network.provider.send("evm_mine", [])
              const { upkeepNeeded } = await raffle.callStatic.checkUpkeep([])
              assert(!upkeepNeeded)
          })

then it work .

explanation for this answer

right now you have this line await raffle.enterRaffle({ value: raffleEntranceFee }) in your code mean it is return this stuff

isOpen  true
timePassed  

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@cryptocambi
Comment options

Comment options

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

@bayurzxsmtp
Comment options

@cryptocambi
Comment options

Answer selected by cryptocambi
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