When I run my tests, both locally and on Travis CI, I get a coverage report, but when the data is sent to codecov (via the codecov package), the report codecov presents is suddenly different. Coverage drops by 10% or so, and the report I see on codecov doesn’t match the HTML report I get running the tests.
Hi @shirblc, thanks for this! I think I figured out why it looks off. The most important thing is that Codecov takes into account branch coverage and does NOT consider a partially covered as hit.
For example, we can take a look at src/app/components/aboutApp/aboutApp.component.ts. This is what we see in the HTML
BRDA specific branch coverage. There are 29 statements here (as matches the HTML branches). If you see lines marked with a 0 at the end, it means that branch was not taken as described in the docs (BRDA:<line number>,<block number>,<branch number>,<taken>)
So what does this mean? Codecov interprets your branch coverage and thus you see coverage seem to be off.