LimeChain / etherlime

Dapp Development framework based on ethers.js
MIT License
185 stars 41 forks source link

Etherlime coverage does not work with ganache provider #269

Closed kenchangh closed 5 years ago

kenchangh commented 5 years ago

In my tests, I am using a ganache-core provider, that is attached to the EtherlimeGanacheDeployer. This is so that when I run the tests, I do not have to run etherlime ganache which opens a port and it is invoked directly in the script.

See the screenshot below on how it's done:

Screenshot 2019-08-03 19 57 51

The etherlime test works fine, however the etherlime coverage is not able to detect that the tests are run. Screenshot below:

Screenshot 2019-08-02 16 36 12
ochikov commented 5 years ago

Thank you for the provided issue. Can you post a repository, where we can test ?

ochikov commented 5 years ago

@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.

ochikov commented 5 years ago

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.