Skip to content

PolicyTestHarnessOptions

Defined in: src/policies/sdk/testing.ts:18

optional adapter: TestAdapter

Defined in: src/policies/sdk/testing.ts:29

Custom adapter to use. If not provided, a TestAdapter is created.


optional gatewayName: string

Defined in: src/policies/sdk/testing.ts:27

Gateway name injected into context. Default: "test-gateway".


optional path: string

Defined in: src/policies/sdk/testing.ts:25

Route path pattern for the test app. Default: "/*".


optional upstream: MiddlewareHandler

Defined in: src/policies/sdk/testing.ts:23

Custom upstream handler. Receives the Hono context after the policy runs. Default: returns { ok: true } with status 200.