Skip to content

lesson:9 AssertionError: expected '[object Promise]' to equal '0' + expected - actual -[object Promise] +0 #2530

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

You must be logged in to vote

Hey @DANIA001 add await in each of these four lines of code

const recentWinner = raffle.getRecentWinner()
const raffleState =raffle.getRaffleState()
const endingTimeStamp = raffle.getLastTimeStamp()
const numPlayer = raffle.getNumberOfPlayers()

Should be something like this

const recentWinner = await raffle.getRecentWinner()
const raffleState = await raffle.getRaffleState()
const endingTimeStamp = await raffle.getLastTimeStamp()
const numPlayer = await raffle.getNumberOfPlayers()

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
7 replies
@RoboCrypter
Comment options

@ghost
Comment options

@RoboCrypter
Comment options

@ghost
Comment options

@RoboCrypter
Comment options

Comment options

You must be logged in to vote
2 replies
@ghost
Comment options

@othaime-en
Comment options

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