Skip to content

Worker usage via comlink fails on "MessageChannel is not defined"Β #11

@gthb

Description

@gthb

I'm using comlink to abstract communications with my worker. When I try out workerloader-jest-transformer, comlink.proxy borks trying to create a MessageChannel:

      at Object.serialize (node_modules/comlink/src/comlink.ts:219:30)
      at toWireValue (node_modules/comlink/src/comlink.ts:498:56)
          at Array.map (<anonymous>)
      at processArguments (node_modules/comlink/src/comlink.ts:468:34)
      at Object.subscribe [as apply] (node_modules/comlink/src/comlink.ts:435:45)
      at ...

... i.e. here: https://github.com/GoogleChromeLabs/comlink/blob/46f79fc257261b68f8987c5e6b9bd635589758df/src/comlink.ts#L219

Presumably MessageChannel needs to be mocked as well?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions