- Version: v14.12.0
- Platform: macOS Darwin Kernel Version 19.6.0
Given this code in index.js:
function fn() {
return true;
/* c8 ignore next */
console.log('never runs');
}
fn();
Running with ci node index.js, I get this output:
----------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------|---------|----------|---------|---------|-------------------
All files | 100 | 66.67 | 100 | 100 |
index.js | 100 | 66.67 | 100 | 100 | 2
----------|---------|----------|---------|---------|-------------------
I would expect the branches to all be considered covered since the entire uncovered branch is excluded by the c8 ignore comment.
----------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
index.js | 100 | 100 | 100 | 100 | 2
----------|---------|----------|---------|---------|-------------------
Given this code in
index.js:Running with
ci node index.js, I get this output:I would expect the branches to all be considered covered since the entire uncovered branch is excluded by the
c8 ignorecomment.