-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Coverage: Contract size too large error thrown ONLY when running with parallel: true #4310
Comments
Hey @0xdavinchee, sorry for not responding before. I think I know what's going on here, I'll try to explain it.
Now the thing is that, when you run tests in parallel and measure coverage, that flag is not being correctly set, and you get that warning. I think the reason why it's not being correctly set is that mocha, in parallel mode, runs each test file in a separate worker process, but solidity-coverage only enables the flag in the "parent" process, which has no effect. From what I saw in Alternatively, you can enable the |
hey @fvictorio no worries at all for not responding before, thank you for responding and explaining what the issue is here. good to know what the underlying issue is! |
I'm closing this in favor of #4492 For anyone landing here: there isn't a lot we can do right now on our side. The workaround for now is to disable parallel mode when the |
Version of Hardhat
2.17.1
What happened?
What happened: when I run my coverage tests using
npx hardhat coverage
with{ mocha: { parallel: true } }
inhardhat.config.ts
, it throws an error:What is expected: coverage runs despite this issue.
Minimal reproduction steps
This can be fixed by adhering to the error message, but we would rather not do that if possible.
Search terms
No response
The text was updated successfully, but these errors were encountered: