Closed kenchangh closed 5 years ago
Thank you for the provided issue. Can you post a repository, where we can test ?
@kenchangh I tried your implementation but I am getting connection error which makes me thing that we need a ganache running as a server and a port that we can listen on, because the coverage is collecting traces after each call. I will continue researching it.
I don't think that this is possible at this moment because for the purpose of the coverage we use web3-provider-engine
library and add two providers - one for deployment and one for debugging (used for coverage). When in your code you call setProvider
you overwrite the provider. I tried to add the provider which comes from ganache to the web3-provider-engine
instance provider, but they do not support it yet. I will still continue to research and looking for solution.
In my tests, I am using a
ganache-core
provider, that is attached to theEtherlimeGanacheDeployer
. This is so that when I run the tests, I do not have to runetherlime ganache
which opens a port and it is invoked directly in the script.See the screenshot below on how it's done:
The
etherlime test
works fine, however theetherlime coverage
is not able to detect that the tests are run. Screenshot below: