test: don't count hard-to-test lines for coverage#672
Conversation
src/common.js
Outdated
| if (e.msg === 'earlyExit') { | ||
| retValue = e.retValue; | ||
| } else { | ||
| /* istanbul ignore next */ |
There was a problem hiding this comment.
I think /* istanbul ignore else */ above the if statement also works.
There was a problem hiding this comment.
Yeah, either way. I just usually stick with ignore next. Do you think I should change it?
There was a problem hiding this comment.
With ignore next, I think istanbul will mark the else route as not taken. ignore else should improve test coverage slightly.
There was a problem hiding this comment.
I'll try it tonight and see if I see a difference in either line or branch coverage
There was a problem hiding this comment.
@freitagbr done. Same line coverage, but ignore else slightly improves branch coverage.
e4f57e7 to
e7fc8b7
Compare
No change in logic. Add `/* istanbul ignore next */` lines for hard-to-test lines so that they don't count against us during code coverage. I've also adjusted comments that I found confusing, and changed some formatting. Partial fix for #671
e7fc8b7 to
4900568
Compare
|
@freitagbr PTAL. I also moved one |
|
LGTM |
No change in logic.
Add
/* istanbul ignore next */lines for hard-to-test lines so thatthey don't count against us during code coverage.
I've also adjusted comments that I found confusing, and changed some
formatting.
Partial fix for #671