-
Sol files all or compiled correctly and so far all have been working in this lesson as in YT video. Then I try to write tests and they just fail.
The code is below, also tried with other functions the same thing happens. I tried with just directly c/p from GitHub repo, also fails
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
@adriadrop You can add this in the hardhat config file. mocha: {
timeout: 100000000
}, |
Beta Was this translation helpful? Give feedback.
-
@adriadrop you can also add this to package.json file "scripts": {
"test": "mocha --timeout 1000000"
} |
Beta Was this translation helpful? Give feedback.
-
Is it normal to that test take so much time locally? Was expecting as usual local deployment and scripts take just few seconds why would mocha tests take so much more? |
Beta Was this translation helpful? Give feedback.
-
Problem wasnt that. Just wrong config for
seems that local hardhat just mines one block after trx so if you have anything higher then 1 it never reaches. So this part was wrong and in tests it never reached it so it would time out whatever I put. thnx for suggestions, hopefully this helps someone else with similar issue. |
Beta Was this translation helpful? Give feedback.
Problem wasnt that. Just wrong config for
waitConfirmations: network.config.blockConfirmations || 2,
seems that local hardhat just mines one block after trx so if you have anything higher then 1 it never reaches. So this part was wrong and in tests it never reached it so it would time out whatever I put.
thnx for suggestions, hopefully this helps someone else with similar issue.