Skip to content

Lesson: 9 :- Error while running unit test #2014

Answered by othaime-en
RohitKS7 asked this question in Q&A
Discussion options

You must be logged in to vote

From the revert error, I'm guessing the checkUpkeep() function returns false. Could you try rewriting these line

bool isOpen = LotteryState.OPEN == s_lotteryState;
bool hasPlayers = s_players.length > 0;

as I have below and see if anything changes.

bool isOpen = (LotteryState.OPEN == s_lotteryState);
bool hasPlayers = (s_players.length > 0);

Replies: 4 comments 13 replies

Comment options

You must be logged in to vote
6 replies
@othaime-en
Comment options

@RohitKS7
Comment options

@othaime-en
Comment options

@RohitKS7
Comment options

@PatrickAlphaC
Comment options

Answer selected by RohitKS7
Comment options

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

Comment options

You must be logged in to vote
5 replies
@RohitKS7
Comment options

@adityabhattad2021
Comment options

@adityabhattad2021
Comment options

@RohitKS7
Comment options

@adityabhattad2021
Comment options

Comment options

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants