Closed PaulRBerg closed 3 years ago
It looks the answer is "no". When I run my tests which do cover both .sol and .ts files, solidity-coverage includes only the former in the coverage report.
Instrumenting for coverage...
=============================
> IPRBProxy.sol
> IPRBProxyFactory.sol
> IPRBProxyRegistry.sol
> PRBProxy.sol
> PRBProxyFactory.sol
> PRBProxyRegistry.sol
Can you recommend a solution, @cgewecke? Should I run coverage with nyc, then merge the two reports?
@paulrberg Yes, I think that's only possibility. One issue is that solidity-coverage is using Istanbul under the hood and you may have to do something to extract its coverage.json
and process it with nyc before using nyc to merge everything.
Another strategy (if you're mostly consuming coverage via CI) could be to have two services report - e.g Coveralls for solidity and Codecov for TS.
Thanks for the tips! I found a third solution - that is to use the Coveralls GitHub Action and upload the coverage reports in parallel.
Oh cool!
I have a repo in which I am testing both Solidity and TypeScript files. Can I use solidity-coverage to generate a coverage report for both?