Hey, does anyone know how to use `export

Hey, does anyone know how to use export default class extends WorkerEntrypoint with SELF and typescript ?
5 Replies
Hebilicious
HebiliciousOP8mo ago
fails with the following error:
FAIL test/index.spec.ts > RPC worker
PrettyFormatPluginError: Illegal invocation
❯ Object.test Users/hebilicious/GitHub/Zeno/zeno-learning/node_modules/.pnpm/[email protected]/node_modules/pretty-format/build/plugins/ReactTestComponent.js?mf_vitest_no_cjs_esm_shim:59:32
❯ findPlugin Users/hebilicious/GitHub/Zeno/zeno-learning/node_modules/.pnpm/[email protected]/node_modules/pretty-format/build/index.js?mf_vitest_no_cjs_esm_shim:302:22
❯ format Users/hebilicious/GitHub/Zeno/zeno-learning/node_modules/.pnpm/[email protected]/node_modules/pretty-format/build/index.js?mf_vitest_no_cjs_esm_shim:451:22
FAIL test/index.spec.ts > RPC worker
PrettyFormatPluginError: Illegal invocation
❯ Object.test Users/hebilicious/GitHub/Zeno/zeno-learning/node_modules/.pnpm/[email protected]/node_modules/pretty-format/build/plugins/ReactTestComponent.js?mf_vitest_no_cjs_esm_shim:59:32
❯ findPlugin Users/hebilicious/GitHub/Zeno/zeno-learning/node_modules/.pnpm/[email protected]/node_modules/pretty-format/build/index.js?mf_vitest_no_cjs_esm_shim:302:22
❯ format Users/hebilicious/GitHub/Zeno/zeno-learning/node_modules/.pnpm/[email protected]/node_modules/pretty-format/build/index.js?mf_vitest_no_cjs_esm_shim:451:22
@MrBBot sorry for the ping but do you have any example/guidance to use the vitest integration with the new RPC features (WorkerEntrypoints) ?
MrBBot
MrBBot8mo ago
Hey! 👋 There's a PR up to add support for this: https://github.com/cloudflare/workers-sdk/pull/5508. I'm not at Cloudflare anymore, but hopefully someone on the team will get this over the line soon. 🙂
Hebilicious
HebiliciousOP8mo ago
that PR looks great, thanks a lot !
jtaylororbisops
jtaylororbisops8mo ago
@Hebilicious did you ever get a version of this working?
Want results from more Discord servers?
Add your server