We are spawning multiple web workers via webpack's worker-loader. We can see that the code of the web workers is instrumented correctly, and that the coverage information is tracked on global.__coverage__.
Note, that the issue seems to be fully decoupled from our use of worker-loader.
However, since the global is an instance of DedicatedWorkerScope in the workers but not window, the coverage information that is send to karma in the end is incomplete.
I'm posting this issue to raise awareness for the topic or to be directed to the correct project to do so. So far, I could not find any report of this in karma-coverage, worker-loader, babel-plugin-istanbul or istanbul itself.
Any updates on this? This is very critical for my project. In my project, all the business logic runs in a worker thread and I need a way to get coverage results for the code running in that thread. Please help.
We are spawning multiple web workers via webpack's worker-loader. We can see that the code of the web workers is instrumented correctly, and that the coverage information is tracked on
global.__coverage__
. Note, that the issue seems to be fully decoupled from our use ofworker-loader
.However, since the
global
is an instance ofDedicatedWorkerScope
in the workers but notwindow
, the coverage information that is send to karma in the end is incomplete.I'm posting this issue to raise awareness for the topic or to be directed to the correct project to do so. So far, I could not find any report of this in
karma-coverage
,worker-loader
,babel-plugin-istanbul
oristanbul
itself.