-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
packages/btcindexer is a Typescript Cloudflare worker in the workers monorepo. It exposes Cloudflare worker RPC BtcIndexerRpc class exported in the index.ts.
We want to have a mocked version of that class - create a stateless in-memory mock of the BtcIndexerRpc, to run enable easy local development without relaying on all external services that the btcindexer is using.
Maybe we can use Typescript mixins, to have a common base class for the mock and mock tests?
Ideally, we have it in the same worker, and have a runtime argument (eg bun run dev --mock) to select the RPC class to use.
Copilot