Skip to content

How to test a custom hook using useWorker? #126

@NandoSangenetto

Description

@NandoSangenetto

I've been playing with useWorker, and it has been working on the browser.

I tried to create a test for a custom hook that is using the useWorker and got many errors.
I've tried to install jsdom-worker, but I keep receiving errors.

I'm going to share the errors:
image
☝️ with jsdom-worker

image

☝️ without `jsdom-worker`

What kind of setup do I need to do to make it work using jest?

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions