RPC not working in vitest integration
We wrote a cloudflare worker using RPC, but when we tried to test it we got an error. I created this minimal reproduction: https://github.com/MarcoIeni/cf-rpc-test
Is it possible to invoke workers RPC from tests?
GitHub
GitHub - MarcoIeni/cf-rpc-test
Contribute to MarcoIeni/cf-rpc-test development by creating an account on GitHub.
5 Replies
It will :soontm:be possible, hopefully once https://github.com/cloudflare/workers-sdk/pull/5508 lands. I'm also excited to get JSRPC unit-testable properly
@Purple Blob Sorry I just stumbled upon this; I'm facing this as well, and the PR you linked got broken into a couple of smaller ones and merged but it doesn't seem to have fixed this issue. 😅
Is this something the team would be looking at in the future?
Hey, unfortunately I couldn't get RPC working locally either. My recommendation for you is to open an issue on GitHub to get the team's attention, and we can upvote so they know this is something many users are waiting for :MeowHeartCloudflare:
Got it, thanks! My RPC does work locally, it's just while testing when the error pops up :coolbutdepressed:
yeah sorry I meant that