Lesson 9: ISSUES with unit testing (time limit exceeded + recent winner undefined) #1036
Unanswered
AlexK020908
asked this question in
Q&A
Replies: 1 comment 6 replies
-
Do you have this in your hardhat.config.js file?
|
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
There are a few issues with my unit test/code
if I ran the test with promise following the video at mark 16:03:00 , I get a timeout exceeded error like so
Error: Timeout of 200000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/alexk47/folder/hardhatCamp/hardhat-smart-raffle/test/unit.test.js)
The test look like this:
I also included a before each before this "it" :
when I delete everything in the try block , only leaving recent winner : I get the following test result
It seems that my fullfillrandomwords function is not setting the winner properly, so I went ahead and checked the function, but it indeed sets the winner properly, so I am not sure what the issue is:
I am really confused, any help is appreciated !
Beta Was this translation helpful? Give feedback.
All reactions