Lesson9: unit test alternative #5025
Answered
by
alymurtazamemon
chopperttt
asked this question in
Q&A
-
for the it("returns false if raffle isnt open" test, can we do the following instead of what is shown in the video? it("returns false if raffle isnt open", async function () {
await raffle.enterRaffle({ value: raffleEntranceFee })
await network.provider.send("evm_increaseTime", [interval.toNumber() + 1])
await network.provider.send("evm_mine", []) //mine one extra block
await raffle.performUpkeep([])
await expect(
raffle.enterRaffle({ value: raffleEntranceFee })
).to.be.revertedWithCustomError(raffle, "Raffle__NotOpen")
}) |
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
Mar 7, 2023
Replies: 1 comment 7 replies
-
@AnneBBB Is it the |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
chopperttt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@AnneBBB Is it the
checkUpkeep
test?