Skip to content

Jest test cases are failing #4

Description

@kvpasupuleti

Hey @dominique-mueller , great work on the package. And it's really of good help for CRA.

  1. I am using CRA, TypeScript, Craco (To override webpack) and Jest.
  2. I could achieve working with Comlink seamlessly by your workaround.
  3. My class that will use this syntax worker-loader!../Somefolder/worker.ts will be exported initially with the app.

So, while running Jest tests, all my tests are getting failed because of this.

I am getting this error while running Jest tests

Cannot find module 'worker-loader!../Somefolder/worker.ts' from 'src/xxx/xxx/xxx/xxx/index.ts'

I have followed this solution. This has resolved this issue, but I got another issue like this

TypeError: ep.addEventListener is not a function

The above issue is reported in Comlink, but I think that's for another reason.

How could I get this working? Any ideas?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproIndicates that this issue needs a reproduction before further steps can be takensupportIndicates a request for help / clarification

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions