Closed jfairley closed 9 years ago
Ya, based on your snapshot you still get 100% coverage on this transpiled file (functions 100% = 4/4 , lines 100% = 15/15 ) . The es5 codes still be fully tested , lines without green is ok in most cases (data structures, empty lines, sub expressions).
I have a React app in which I am using ES6 features and leveraging the babel transpile feature of
gulp-jsx-coverage
. Unfortunately, the generated coverage report includes the generated ES5 code, which, of course, is not fully tested. This has managed to tank my coverage numbers. It would be better to calculate coverage numbers based on the pre-babel code.I have the following gulp task for tests:
I also have the following in one of my components:
Despite my best efforts to test for full coverage, the type-safety checks in the generated code tank the overall coverage for the file. See below including the large bit of untested, generated code on the first line.