workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

🚀 Feature Request: Durable Object mocks

Open punkeel opened this issue 1 year ago • 2 comments

Describe the solution

I'm trying to test a Worker script talking to a Durable Object, using Workers RPC and Vitest.

This (will) work fine once #5508 lands, with one caveat: I don't think it's possible to mock the Durable Object functions–they're hidden behind a get(id) call.

Can we simplify how mocking works in this scenario? (This is not the right place to argue on mocking, but real quick: I'm trying to test error handling and other tricky unhappy paths)

This may be related to #5464.

punkeel avatar Apr 17 '24 19:04 punkeel