import { hc } from '../../client/index.ts' import type { Hono } from '../../hono.ts' // eslint-disable-next-line @typescript-eslint/no-explicit-any type ExtractEnv = T extends Hono ? E : never // eslint-disable-next-line @typescript-eslint/no-explicit-any export const testClient = >( app: T, Env?: ExtractEnv['Bindings'] | {}, executionCtx?: ExecutionContext ) => { const customFetch = (input: RequestInfo | URL, init?: RequestInit) => { return app.request(input, init, Env, executionCtx) } return hc('', { fetch: customFetch }) }