Skip to content

Lesson 9: Error while running Raffle__UpkeepNotNeeded while running Unit tests #768

Answered by PatrickAlphaC
harshuo2 asked this question in Q&A
Discussion options

You must be logged in to vote

Great formatted question. Right now, you're running await inside await expect, so you code is executing:

await raffle.performUpkeep("0x")

We don't want it to do await for performUpkeep to finish, so we just remove the await

await expect(raffle.performUpkeep("0x")).to.be.reverted

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by PatrickAlphaC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants