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
James10mo ago
getPlatformProxy is local-only since it's emulating bindings through miniflare
Mackenly
MackenlyOP10mo ago
Do you know the best way to unit test functions that require remote bindings? Thanks!
James
James10mo ago
Not personally
Mackenly
MackenlyOP10mo ago
Mackenly
MackenlyOP10mo 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