I m using KV in a similar way and was

I'm using KV in a similar way and was struggling with this same topic and ended up using miniflare 2 for unit tests for the time being, because through that I was able to manipulate KV & R2. I have a few basic integration tests (checking some response statuses) set up with wrangler 3, but nothing very useful yet, because of inability to seed data (both KV and R2). I did notice that the unstable_dev API has bindings for KV etc. in the properties, but I guess they are not wired to anything yet. Would be great if they get wired up and some methods are exposed to allow seeding and manipulating data for testing purposes.
2 Replies
Adam
Adam•2y ago
Sorry for the issues that you're running into. We are currently working on getting local implementations of KV and R2 for Wrangler v3. That work should be wrapped up and documented very soon.
Shirokawa
ShirokawaOP•2y ago
Thanks a lot for your reply! It went unnoticed by me for some time. Sorry about that! That sounds great! Would be sorely needed. 🙂 I was just introducing e2e tests with playwright to test cache behaviour that relies on KV & R2 having data. Being able to do that on the integration test level would be super!
Want results from more Discord servers?
Add your server