Skip to content

Running coverage on a contract which uses a contract without ContractDefinition fails #429

@robin-thomas

Description

@robin-thomas

If you have a smart contract A.sol, whose coverage is skipped in .solcover.js, as shown below (which is used in the truffle tests), then the unit tests are not getting run when we run the coverage command (but the tests work fine with truffle test command).

pragma solidity >=0.5.0 <0.6.0;

import "npm_package/contracts/A.sol";

But if I copy the file npm_package/contracts/A.sol into the contract file A.sol and run the coverage, then it works.

Any idea how to solve this (without copying over the solidity contract from node_modules)?

I'm using version 0.7.0-beta.2.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions