Closed lobabob closed 8 years ago
if you have a line of code that says var x= 10; console.log(x)
that's one line and 2 statements.
Of the two statement coverage is more accurate - however line coverage exists for interop with line oriented coverage tools like lcov
and backwards compatibility with YUI coverage (for when istanbul was written, no longer relevant now)
if you have a line of code that says
var x= 10; console.log(x)
that's one line and 2 statements.Of the two statement coverage is more accurate - however line coverage exists for interop with line oriented coverage tools like
lcov
and backwards compatibility with YUI coverage (for when istanbul was written, no longer relevant now)
I'm using solidity-coverage, that uses Istanbul. In many cases I've got more lines than statements. How is that possible?
@fabianorodrigo like this return ; console.log('never run');
, 2 statements in one line. while the second statement will never run.
Please let me know if there is a more appropriate place to ask this.
Most other coverage tools I've used before have either had statements or lines, never both leading me to think that they were one and the same. Istanbul however has both statements and lines. Can anyone clarify the difference between the two for me?