Coverage fails to compile on second pass
See original GitHub issueI am working on a large project and not able to successfully run the coverage. The error seems to occur on compilation of the openzeppelin library in preparation for the tests. All the truffle tests should pass.
Writing artifacts to ./build/contracts
Running: truffle test --network coverage
(this can take a few seconds)...
Using network 'coverage'.
Compiling ./test/helpers/contracts/PolyToken.sol...
Compiling openzeppelin-solidity/contracts/math/SafeMath.sol...
Compiling openzeppelin-solidity/contracts/ownership/Ownable.sol...
Compiling openzeppelin-solidity/contracts/token/ERC20/BasicToken.sol...
Compiling openzeppelin-solidity/contracts/token/ERC20/ERC20.sol...
Compiling openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol...
Compiling openzeppelin-solidity/contracts/token/ERC20/MintableToken.sol...
Compiling openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol...
Compilation warnings encountered:
openzeppelin-solidity/contracts/math/SafeMath.sol:13:3: Warning: Function state mutability can be restricted to pure
function mul(uint256 a, uint256 b) internal returns (uint256 c) {
^ (Relevant source part starts here and spans across multiple lines).
,openzeppelin-solidity/contracts/math/SafeMath.sol:29:3: Warning: Function state mutability can be restricted to pure
function div(uint256 a, uint256 b) internal returns (uint256) {
^ (Relevant source part starts here and spans across multiple lines).
,openzeppelin-solidity/contracts/math/SafeMath.sol:39:3: Warning: Function state mutability can be restricted to pure
function sub(uint256 a, uint256 b) internal returns (uint256) {
^ (Relevant source part starts here and spans across multiple lines).
,openzeppelin-solidity/contracts/math/SafeMath.sol:47:3: Warning: Function state mutability can be restricted to pure
function add(uint256 a, uint256 b) internal returns (uint256 c) {
^ (Relevant source part starts here and spans across multiple lines).
Error: Invalid number of arguments to Solidity function
at Object.InvalidNumberOfSolidityArgs (/Users/stephanegosselin/github/polymath-core/node_modules/truffle/build/webpack:/~/web3/lib/
web3/errors.js:25:1)
at SolidityFunction.validateArgs (/Users/stephanegosselin/github/polymath-core/node_modules/truffle/build/webpack:/~/web3/lib/web3/
function.js:74:1)
at SolidityFunction.toPayload (/Users/stephanegosselin/github/polymath-core/node_modules/truffle/build/webpack:/~/web3/lib/web3/fun
ction.js:90:1)
at SolidityFunction.sendTransaction (/Users/stephanegosselin/github/polymath-core/node_modules/truffle/build/webpack:/~/web3/lib/we
b3/function.js:163:1)
at SolidityFunction.execute (/Users/stephanegosselin/github/polymath-core/node_modules/truffle/build/webpack:/~/web3/lib/web3/funct
ion.js:256:1)
at /Users/stephanegosselin/github/polymath-core/node_modules/truffle/build/webpack:/~/truffle-contract/contract.js:204:1
at new Promise (<anonymous>)
at /Users/stephanegosselin/github/polymath-core/node_modules/truffle/build/webpack:/~/truffle-contract/contract.js:155:1
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
-------------------------------------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
-------------------------------------------|----------|----------|----------|----------|----------------|
contracts/ | 23.2 | 7.32 | 27.5 | 23.85 | |
ModuleRegistry.sol | 50 | 21.43 | 33.33 | 46.15 |... 116,126,133 |
Pausable.sol | 12.5 | 12.5 | 25 | 20 |... 35,42,43,44 |```
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
The peculiar case of passing tests and failing coverage
The Problem Observed. What the build report said is that all tests have passed, but the coverage report had failed. The project's tests...
Read more >coverage fails while jest passes · Issue #6827 - GitHub
Try running with coverage. project $ ./node_modules/. bin/jest --coverage FAIL src/ExampleError. test.
Read more >github-actions test-coverage fails on one package but passes ...
The issue with Delaporte seems to be that the package uses FORTRAN code, which requires gfortran, but the default C compiler on macOS...
Read more >How can I fail the pipeline if the code coverage is below 70 ...
We are using springboot, Jacoco, and azure devops, we need to break the pipeline if the percentage of code coverage is less than...
Read more >Troubleshooting Code Coverage - Visual Studio (Windows)
Code coverage is not run, and either the code coverage window doesn't open at the end of the test run, or it shows...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes! That was it. Thank you for catching my slip up.
@thegostep Oh good, glad it works.