Open duro opened 7 years ago
Same here.
I have 0% coverage for 2 files (I have >300 suites and > 1200 tests in total) until I add comment somewhere in the file. It doesn't matter if I comment with // comment
or /* comment */
Text in the comment can be anything and comment can be placed anywhere in the file.
I don't have ignore comments (https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md) in my files.
My config is based on CRA too. It's really strange and I really don't know what happens.
I have a super bizarre issue where a very simple file that has no dynamic content (it's a very simple styled-components React component) and is imported by a parent class comes back 0% covered,
But, then I add a single line comment, and it comes back 100% (as I would have expected it.
Here is the code of the file when it comes back 0%:
And I make this very simple change, and it comes back 100%
I am using Instanbul with Jest via a non-ejected React Create App at the latest version (
1.0.12
)