Closed RiccardoBiosas closed 2 years ago
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
contracts/libraries/MathUtils.sol | 2 | 50.0% | ||
contracts/libraries/PreciseMathUtils.sol | 2 | 50.0% | ||
contracts/libraries/SortedDoublyLL.sol | 6 | 87.14% | ||
<!-- | Total: | 10 | --> |
Totals | |
---|---|
Change from base Build 2556706908: | -2.0% |
Covered Lines: | 768 |
Relevant Lines: | 781 |
Ah actually it would be great to add additional tests for the reduced coverage - https://coveralls.io/builds/50828602 Should be small only
The only reason why the coverage dropped is because the package solidity-coverage
is not currently taking into account the foundry tests - unlike the previous truffle-based tests run via runSolidityTest.js
. Foundry has recently added a coverage
feature in one of its latest 2.x releases but we cannot upgrade to it right away due to this issue in the way foundry 2.x handles L2 networks: once the issue will be addressed I think we can fix the 'fake' coverage drop.
What does this pull request do? Explain your changes. (required) Since the protocol repo has been gradually adopting Foundry to run Solidity-based tests - which provides a better alternative to Truffle-, the PR refactors the current truffle-based Solidity tests so that they can be run as part of the Foundry codebase.
Specific updates (required)
runSolidityTest
helperHow did you test each of these updates (required) Successfully run
yarn test
andforge test -v --match-contract Test
to test all the new foundry-based unit testsDoes this pull request close any open issues? https://github.com/livepeer/protocol/issues/576
Checklist:
yarn test
pass