Lesson 9, Unit testing: " Error: Timeout of 200000ms exceeded " #5383
-
OverviewI am testing the last it("picks a winner and emits to a winner list, changes Lottery status to OPEN, resets the lottery array & timestamp, and send money or reverts error otherwise", async function () { I receive this response and gets stuck on it, after which the timeout error appears: Lottery Unit Test
fulfillRandomWords
Local network detected (Mock)! Deploying Mocks....
---------------------------------
Local network detected (Mock)! Deploying Mocks....
Found the event!
0x70997970C51812dc3A010C7d01b50e0d17dc79C8
0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
0x70997970C51812dc3A010C7d01b50e0d17dc79C8
0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC
0x90F79bf6EB2c4f870365E785982E1f101E93b906
1) picks a winner and emits to a winner list, changes Lottery status to OPEN, resets the lottery array & timestamp, and send money or reverts error otherwise
0 passing (3m)
1 failing
1) Lottery Unit Test
fulfillRandomWords
picks a winner and emits to a winner list, changes Lottery status to OPEN, resets the lottery array & timestamp, and send money or reverts error otherwise:
Error: Timeout of 200000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/mightguy/hh-1/hardhat-smartcontract-lottery/test/unit/Lottery.test.js)
at listOnTimeout (node:internal/timers:569:17)
at processTimers (node:internal/timers:512:7) All other tests are working fine. Only this one is facing error. My repo: https://github.com/Jatinkkalra/hardhat-smartcontract-lottery If anyone is able to find out the issue then that will be of a great help to me. Thank you in advance ser. 🙏 |
Beta Was this translation helpful? Give feedback.
Answered by
Jatinkkalra
Jun 14, 2023
Replies: 1 comment 2 replies
-
@Jatinkkalra call |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was going through the repo again and after making some other changes I am no longer facing this issue.
Updated repo: https://github.com/Jatinkkalra/hardhat-smartcontract-lottery