SAP/karma-ui5

Coverage not gathered?

wozjac opened this issue · 2 comments

Hello,

recently I have a problem with my library project, but also took one from web and just run it:
https://github.com/mauriciolauffer/openui5-model-json-crud

The coverage is empty and I can't figure out why, Mauricio also checked this:
https://twitter.com/jacekwoz/status/1605180508530409472?s=20&t=zShAzOH8KC80VCFiCuD6wA

What do we miss?

matz3 commented

The issue seems to be caused by the server-absolute references to /resources/ e.g. in test/openui5/model/json/crud/unit/unitTests.html. This way the files are not served via the karma server (only listening to requests below /base/) which means no instrumented files are loaded, so no coverage can be tracked. Please always use relative paths to prevent such issues.

Thanks @matz3, issue solved.