karma-runner/karma-coverage

Angular karma coverage with any target beyond ES5 causes tests to fail

Ketec opened this issue · 0 comments

Ketec commented

My Angular lib itself is targeting ES2017.

I tried swapping out test tsconfig to anything newer beyond ES5 - and 90% of my test coverage fails when running karma with --code-coverage.

Is there no support for anything newer?

The failures are on completely valid tests.
Like being unable to read "markForCheck" (angular ChangeDetectorRef) of undefined or anything that uses fixture.detectChanges() fails to actually trigger changedetection.