c8 icon indicating copy to clipboard operation
c8 copied to clipboard

Ignore statements not working correctly for barrel/index files

Open beyerleinf opened this issue 3 years ago • 5 comments

  • Version: v16.13.1
  • Platform: Linux 5.10.60.1-microsoft-standard-WSL2

As the title states, I found an issue with ignore statements in barrel/index files that just re-export other modules. Coverage gets reported incorrectly and the ignore comments actually add statements to the file. Also, I think /* c8 ignore file */ would be nice 😊

image

Example repo: beyerleinf/c8-barrel-test - just run npm t and open coverage/index.html.

beyerleinf avatar Feb 13 '22 02:02 beyerleinf

I don't believe this behavior was ever implemented in v8-to-istanbul.

bcoe avatar Mar 23 '22 18:03 bcoe

In case it matters, I just noticed that this also happens for files that only contain interfaces - which is pretty annoying 😄

beyerleinf avatar Oct 09 '22 22:10 beyerleinf

I have the same issue.

maciejregula avatar Mar 16 '23 23:03 maciejregula

Same here

image

xolott avatar Apr 09 '23 07:04 xolott

i have the 'interface-only' issue, any workarounds?

srl295 avatar Jul 05 '23 19:07 srl295