Closed theahmadjawad closed 4 months ago
I am having trouble testing a component that uses workerpool. I am getting the following error TypeError: 'postMessage' requires 2 arguments: 'message' and 'targetOrigin'
TypeError: 'postMessage' requires 2 arguments: 'message' and 'targetOrigin'
I am using vitest. This Is my vitest config
test: { globals: true, environment: 'jsdom', setupFiles: ['@vitest/web-worker'], },
This is how I am using the workerpool inside the component
const pool = useMemo(() => workerpool.pool(Worker, { workerOpts: { type: 'module', }, workerType: 'web', }), []);
Thanks for reporting. How can we reproduce this issue?
Closing due to lack of response. Please reopen if needed.
I am having trouble testing a component that uses workerpool. I am getting the following error
TypeError: 'postMessage' requires 2 arguments: 'message' and 'targetOrigin'
I am using vitest. This Is my vitest config
This is how I am using the workerpool inside the component