Skip to content

Commit 42d8941

Browse files
committed
test(service-datasource): type the harness app off the adapter's own accessor
`tsc --noEmit` reds on a hand-written `{ fetch: (req: Request) => Promise<Response> }`: Hono's `fetch` takes an env and an execution context after the request, so the narrower signature is a type error rather than a simplification. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ
1 parent 2c7971a commit 42d8941

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/services/service-datasource/src/__tests__/admin-routes-tenancy-posture-admission.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,13 @@ function kernelFor(wiring: Wiring): ObjectKernel | undefined {
228228
}
229229

230230
interface Harness {
231-
app: { fetch: (req: Request) => Promise<Response> };
231+
/**
232+
* The raw Hono app, typed off the adapter's own accessor rather than
233+
* restated as a narrower `{ fetch }` shape — Hono's `fetch` takes an env and
234+
* an execution context after the request, so a hand-written signature is a
235+
* type error, not a simplification.
236+
*/
237+
app: ReturnType<HonoHttpServer['getRawApp']>;
232238
/** Every datasource row the fixture holds, in insertion order. */
233239
store: () => DatasourceRow[];
234240
service: ReturnType<typeof createServiceDouble>;

0 commit comments

Comments
 (0)