Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combining Code Coverage (Karma & Cypress) #719

Open
jasonparallel opened this issue Apr 4, 2023 · 1 comment
Open

Combining Code Coverage (Karma & Cypress) #719

jasonparallel opened this issue Apr 4, 2023 · 1 comment

Comments

@jasonparallel
Copy link

jasonparallel commented Apr 4, 2023

We are noticing some odd things when trying to combine the coverage.
Looking at the JSON report for the statementMap
Both commonly have a null for the end column but in some instances karma will report a null and cypress (with istanbul instrumentation) will report a specific end column number. When these are combined via nyc they are treated as 2 different statements for the coverage stats
{ "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": null } }
vs
{ "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 46 } }

What does a null column end mean? Could the merge handle this more gracefully?

In this case 16 was wrapped in a if statement that the cypress coverage picked up on for the statementMap and also the branchMap but the karma coverage omited from both.
{ "start": { "line": 15, "column": 2 }, "end": { "line": 17, "column": null } }

We also saw the same thing happen outside the if statement
{ "start": { "line": 18, "column": 2 }, "end": { "line": 18, "column": 14 } }
vs
{ "start": { "line": 18, "column": 2 }, "end": { "line": 18, "column": null } }

And also the same null ending column issue in the fnMap
{ "name": "getError", "decl": { "start": { "line": 14, "column": 16 }, "end": { "line": 14, "column": 24 } }, "loc": { "start": { "line": 14, "column": 45 }, "end": { "line": 19, "column": null } } }
vs
{ "name": "getError", "decl": { "start": { "line": 14, "column": 16 }, "end": { "line": 14, "column": 24 } }, "loc": { "start": { "line": 14, "column": 45 }, "end": { "line": 19, "column": 1 } }

@tommyc38
Copy link

Yeah, I am running into this same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants