AssertionError: expected undefined to equal false #1418
-
i get an error i think the error is with it("returns false if enough time hasn't passed", async () => {
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.equal(upkeepNeeded, false)
}) I did add |
Beta Was this translation helpful? Give feedback.
Answered by
technophile-04
Jul 30, 2022
Replies: 2 comments 3 replies
-
@0xamey show your checkUpkeep function. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hii @0xamey , It seems that you forgot to add it("returns false if enough time hasn't passed", async () => {
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([])
- const { upkeepNeeded } = raffle.callStatic.checkUpkeep([])
assert.equal(upkeepNeeded, false)
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
alymurtazamemon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hii @0xamey , It seems that you forgot to add
await