Closed
Description
Hi there, I'm trying to setup my env with parallel testing (because all my tests take about 4 minutes) and I was able to improve the time to 40seconds with last mocha version, but I can't get solidity-coverage run in parallel.
What I'm using:
- Hardhat: 2.6.0
- Mocha: 9.1.1
- solidity-coverage: 0.7.16
Commands:
Parallel: npx mocha
Sequential: npx hardhat test
(or npx hardhat coverage
to get the coverage)
My .mocharc.json
:
{
"parallel": true,
"jobs": 4,
"slow": "1500", // 1.5s
"full-trace": true,
"bail": false,
"inspect": true,
"timeout": 20000,
"exit": true,
"require": ["hardhat/register", "solidity-coverage"] // tried with `solidity-coverage/api` and others but nothing happened
}
Already tried with mocha:
option in the .solcover.js
but it runs sequentially with npx hardhat coverage
.
Mocha requiring hardhat/register starts X processes and then run everything:
It's more a question than an issue but it would be awesome if we can get coverage working with mocha parallel =)
Cheers.