Questions tagged [solidity-coverage]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
28 views

How to resolve hardhat solidity-coverage error: Could not instrument

When I'm trying to use the plugin solidity-coverage (in hardhat), it returns the following error: Error in plugin solidity-coverage: TypeError: Could not instrument: libraries\BigNumber.sol. (Please ...
Pacdac's user avatar
  • 80
0 votes
0 answers
25 views

Error in plugin solidity-coverage: TypeError: Cannot read properties of undefined (reading 'match')

when running yarn hardhat coverage, it compiled the solidity files successfully and then gave the following error message: Error in plugin solidity-coverage: TypeError: Cannot read properties of ...
Liron Achdut's user avatar
2 votes
2 answers
915 views

Error in plugin solidity-coverage: TypeError: provider.send is not a function - Hardhat

In case you ever get this error Error in plugin solidity-coverage: TypeError: provider.send is not a function when trying to run coverage for your solidity contracts. Do the following
Web3Phoenix's user avatar
1 vote
0 answers
281 views

Signature Verification Errors in solidity-coverage

I am currently creating a test for signatures, and it runs fine with truffle, but with solidity-coverage I get the following error... ECDSA: invalid signature 'v' value I checked the ethereum-js ...
sZma5a's user avatar
  • 11
0 votes
2 answers
1k views

solidity-coverage : configure to ignore files

I have a helper contract that is used only for testing. I don't want it picked up by coverage and showing in coverage results. I want to exclude it somehow. This link basically says the only option is ...
sola24's user avatar
  • 1,238
3 votes
1 answer
305 views

solidity-coverage giving wrong report

The first time I ran npx hardhat coverage it hadn't removed the files that should be ignored and I got this result, which is correct. But after I added this to .solcover.js: module.exports = { ...
n3n3's user avatar
  • 608
7 votes
1 answer
1k views

What is the % Branch column for in solidity-coverage?

In the solidity-coverage package output, there is a column called % Branch, what is it for? yarn hardhat coverage Output: ---------------------------|----------|----------|----------|----------|------...
Patrick Collins's user avatar
1 vote
1 answer
229 views

Solidity coverage report , need help as a beginner

I have a NFT project in truffle for which I have written some tests but need to make a "coverage report". I have no knowledge how to go about it . Is there any reading material or any posts ...
Ashish kumar's user avatar
1 vote
0 answers
354 views

Silence visibility warning, state mutability can be restricted to pure

Suppose I have an interface: pragma solidity 0.7.6; interface Foo { function foo() public view returns(bool); } And a simplistic implementation like a mock: contract Bar is Foo { function foo() ...
Rob Hitchens's user avatar
  • 55.2k
1 vote
0 answers
205 views

Running solidity-coverage via a buidler plugin on a project using openzeppelin/test-environment yields 0% coverage

I have a project where I would like to check test coverage for the Solidity Smart Contracts. I am using solidity-coverage via a buidler plugin and the test coverage is always 0%. The output from the ...
Darren Jensen's user avatar