TrueFiEng / Waffle

Library for writing and testing smart contracts.
https://getwaffle.io
MIT License
960 stars 161 forks source link

Solcover 0 test coverage #804

Open cowboymarv opened 1 year ago

cowboymarv commented 1 year ago

It seems that MockProvider is not compatible with Solcover tool, all the metrics are always 0. After changing to ethers provider it started to work immediately. I'm using:

"@nomiclabs/hardhat-waffle": "^2.0.3",  
"ethereum-waffle": "^3.4.4", //tried also 4.0.7  
"hardhat": "^2.11.2",  
"solidity-coverage": "^0.8.2"  
pawelpolak2 commented 1 year ago

When using hardhat-waffle plugin use the mock provider defined in the hardhat runtime environment (hre.waffle.provider). Let me know if that helps.