getPlatformProxy Remote/Local Flag

unstable_dev supports passing in a local flag in the options object, but getPlatformProxy doesn't seem to support it. Is there a workaround to allow for unit testing things like AI? https://developers.cloudflare.com/workers/wrangler/api/#getplatformproxy
Cloudflare Docs
API · Cloudflare Workers docs
An experimental API to programmatically manage your Cloudflare Workers.
5 Replies
James
James4mo ago
getPlatformProxy is local-only since it's emulating bindings through miniflare
Mackenly
Mackenly4mo ago
Do you know the best way to unit test functions that require remote bindings? Thanks!
James
James4mo ago
Not personally
Mackenly
Mackenly4mo ago
Mackenly
Mackenly4mo ago
It seems my actual bug may be a problem with miniflare instead of a remote problem: https://github.com/cloudflare/workers-sdk/issues/5028 But keeping the feature request for other use cases.
GitHub
🐛 BUG: duplex option is not set in Proxy.fetch · Issue #5028 · cl...
Which Cloudflare product(s) does this pertain to? Wrangler core, Miniflare What version(s) of the tool(s) are you using? Wrangler 3.27.0 What version of Node are you using? 20.10.0 What operating s...
Want results from more Discord servers?
Add your server
More Posts