nyc
nyc copied to clipboard
Question on statementMap in coverage json output
For a toy example, I dumped the output json to a file and found that the first statement in statementMap
was a superset of the subsequent statements. Worse, the s
entry that documents coverage was 1
for the superset but 0
for one of the others. I am pasting it here:
"statementMap":{"0":{"start":{"line":2,"column":4},"end":{"line":7,"column":5}},"1":{"start":{"line":3,"column":8},"end":{"line":3,"column":21}},"2":{"start":{"line":6,"column":8},"end":{"line":6,"column":22}},"3":{"start":{"line":10,"column":0},"end":{"line":10,"column":38}}},
"s":{"0":1,"1":1,"2":0,"3":1}
Does it make sense ? I thought statements in the statementMap
would not have any intersections.