You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using this as a repo for my solidity project and it's been really helpful. Saw that solidity-coverage was added here but it returns 0% for me when I run it. Getting the same issue with the setup in my project as well. Wonder if you guys got it working?
> server: http://127.0.0.1:8555
> ganache-core: v2.8.0
> solidity-coverage: v0.7.1
Network Info
============
> port: 8555
> network: soliditycoverage
Instrumenting for coverage...
=============================
> Counter.sol
Compiling...
Downloading compiler version 0.6.2
Compiled 2 contracts successfully
All contracts have already been compiled, skipping compilation.
Counter
count up
✓ should count up (277ms)
count down
✓ should fail (1051ms)
✓ should count down (188ms)
3 passing (2s)
--------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
--------------|----------|----------|----------|----------|----------------|
contracts/ | 0 | 0 | 0 | 0 | |
Counter.sol | 0 | 0 | 0 | 0 |... 28,30,32,33 |
--------------|----------|----------|----------|----------|----------------|
All files | 0 | 0 | 0 | 0 | |
--------------|----------|----------|----------|----------|----------------|
> Istanbul reports written to ./coverage/ and ./coverage.json
> solidity-coverage cleaning up, shutting down ganache server
The text was updated successfully, but these errors were encountered:
Ok, the pull request was informative but I had a lot of stuff set up already so it took a bit of work to get everything where I needed it. Some things to note:
Waffle needs to be imported from @nomiclabs/buidler which this repo is doing properly but I was not.
When solidity-coverage runs it deploys different bytecode that is much larger than what the regular builds create. It took me a little while to figure this out since solidity-coverage also deletes its artifacts after it runs. I added in an if block and an environment variable to switch between the two artifacts depending on if I was running tests normally or coverage.
Not sure where to properly document this for others to find out, the solidity-coverage docs and the buidler docs weren't too helpful. I'm sure others will run into the same issue. I'll ping the devs there.
I've been using this as a repo for my solidity project and it's been really helpful. Saw that solidity-coverage was added here but it returns 0% for me when I run it. Getting the same issue with the setup in my project as well. Wonder if you guys got it working?
The text was updated successfully, but these errors were encountered: