Any ideas how to get worker constructors into Vitest?
Trying to create an object using a constructor from the worker. However the worker types only specify interfaces, leading to the error in the screenshot.
I've tried to use the
And set up
However I'm not able to use any of the types from worker runtime it seems.
I'm trying to mock an
Any ideas?
I've tried to use the
vitest/packages/web-worker package from https://github.com/vitest-dev/vitest/tree/main/packages/web-workerAnd set up
vitest.config.js like so:However I'm not able to use any of the types from worker runtime it seems.
I'm trying to mock an
EmailMessage replicating the actual thing here: https://github.com/webbertakken/email-worker/blob/526b020af8bcefcd9ecfeb81eb264e8d826b633a/test/helpers/createEmailMessage.ts#L20Any ideas?
