Lesson 9 Error: "before each" hook for "initializes the raffle correctly": #1714
-
I've had no issues compiling and running much of the code in lesson 9, however once I get to around 15:26:37 and run the command "hh test", I get the following error: (pushed all files to GitHub at: https://github.com/masonrs2/hardhat-raffle.git) Here is the code for "01-deploy-raffle.js" : Here is the code for "Raffle.test.js" : I've been stuck on this error for over 2 hours now any help would be appreciated thank you!! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
Try logging raffleState and interval before assert statement in raffle.test.js |
Beta Was this translation helpful? Give feedback.
-
From my past experience, this error mostly revolves around the presence of an error in your environment variables. Try and check your |
Beta Was this translation helpful? Give feedback.
-
Move the .env file outside the deploy folder. And I made a PR, merge it and pull the changes -- then check if it fixes your problem. Additional note:Please NEVER upload .env files to GitHub, even if they are for developmental processes. If someone wanted, they could definitely be a nuisance. Next time, use a gitignore |
Beta Was this translation helpful? Give feedback.
-
@masonrs2 Made a pull request, merge and pull changes. This will solve your issue. |
Beta Was this translation helpful? Give feedback.
@masonrs2 Made a pull request, merge and pull changes. This will solve your issue.