The babel istanbul instrumentation embed paths in the instrumented files like "TagTime-desktop/src/prompt.js". This is because it comes after the TypeScript step in the build.
It seems to be failing to use the inline sourcemaps to correctly map it back to the original source.
I can't think of a simple fix.
Not viable:
remap-istanbul doesn't seem like a viable option, because the intermediate "file" that got instrumented doesn't exist - it's just a step in the build pipeline.
Manually fixing up the coverage output doesn't work for the same reason
Manually fixing up the source files so the path variables point to ./app/src/... instead might work, but would give very undesirable outputs - the instrumented code is full of extra stuff.
Options:
Replacing the build pipeline with a two step 1/ typescript transpile to files 2/ babel instrument might work. It should give code coverage of the typescript output, which wouldn't be terrible. Makes the build more involved.
Make istanbul-babel-plugin work in this scenario
Use another coverage tool altogether - jscover? Would mean starting from scratch with the hacks needed to make e2e and electron-mocha coverage work.
The babel istanbul instrumentation embed paths in the instrumented files like "TagTime-desktop/src/prompt.js". This is because it comes after the TypeScript step in the build.
It seems to be failing to use the inline sourcemaps to correctly map it back to the original source.
I can't think of a simple fix.
Not viable:
Options: