You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function inlineWorker () { ... }
const data = `(${inlineWorker}) ...`
const worker = new Worker(URL.createObjectURL(new Blob(data, ....)))
Istanbul is poisoning inlineWorker with cov_${id}++; and worker fails. So we have to add istanbul ignore But it means that inlineWorker will be uncovered. So we are using workaround: function copy.
// can be covered outside worker
export function inlineWorker () { ... }
// istanbul ignore next
function inlineWorkerCopy () { ... }
const data = `(${inlineWorkerCopy}) ...`
const worker = new Worker(URL.createObjectURL(new Blob(data, ....)))
This workaround is ugly but works fine.
We can see here that istanbul ignore comments are not enough for everyday usage. Please add switch to disable istanbul in runtime. It may be inlineWorker.toString({ istanbul: false }) or inlineWorker_without_istanbul.toString(), etc. Thank you.
Hello, we are working with web workers:
Istanbul is poisoning
inlineWorker
withcov_${id}++;
and worker fails. So we have to addistanbul ignore
But it means thatinlineWorker
will be uncovered. So we are using workaround: function copy.This workaround is ugly but works fine.
We can see here that
istanbul ignore
comments are not enough for everyday usage. Please add switch to disable istanbul in runtime. It may beinlineWorker.toString({ istanbul: false })
orinlineWorker_without_istanbul.toString()
, etc. Thank you.#310 may be related.
The text was updated successfully, but these errors were encountered: