Code coverage missing covered lines
Describe the bug
Our AIBTC contracts have a lot of unit tests covering the code, and our preferred pattern is to test every error path then a few success paths depending on the functionality.
We have GitHub CI configured to run clarinet check then run the tests and upload the resulting coverage file to codecov.
Codecov has some trouble with complex printed tuples and sometimes reports a line as uncovered right in the middle of a covered path. e.g. https://app.codecov.io/gh/aibtcdev/aibtcdev-daos/blob/main/contracts%2Fdao%2Fextensions%2Faibtc-action-proposal-voting.clar#L193 https://app.codecov.io/gh/aibtcdev/aibtcdev-daos/blob/main/contracts%2Fdao%2Fextensions%2Faibtc-dao-users.clar#L69 https://app.codecov.io/gh/aibtcdev/aibtcdev-daos/blob/main/contracts%2Fdao%2Fextensions%2Faibtc-rewards-account.clar#L59 https://app.codecov.io/gh/aibtcdev/aibtcdev-daos/tree/main/contracts%2Fdao%2Fextensions
Expected behavior
"I could've used a little more coverage."
Screenshots
Thanks for reporting @whoabuddy
Regarding the asserts! line, I assume you don't have a test that triggers ERR_INSUFFICIENT_BALANCE.
Can you confirm?
Note for assignee: If so, we should report report partial coverage (branching), the condition is always evaluated, but the thrown value (2nd arg) isn't necessary. It seems to be working with genhtml on my end, so maybe our branching format isn't compatible with codecov.
Yes, that is correct, the printed tuple pattern is reused across a few contracts and all have the same issue. The asserts line is not covered by tests but will note any future mismatches here if they come up.