Skip to content

PolicyTestHarnessOptions

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

optional adapter: TestAdapter

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

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


optional gatewayName: string

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

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


optional path: string

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

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


optional upstream: MiddlewareHandler

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

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