testing_action_specs.ts

Test-only action specs and handler.

_testing_emit_notifications + _testing_notification are kept out of the production codegen surface (all_action_specs in action_specs.ts). They register on the live HTTP-RPC + WebSocket dispatchers only when ZZZ_ENABLE_TEST_ACTIONS=1, which the cross-process test binary (testing_zzz_server) sets unconditionally and production never does.

In-process unit tests (src/test/server/routes/ws.integration.*.test.ts) import the specs directly into custom action arrays — no env var needed since they bypass the production registration path.

Naming follows the test-binary safety convention — _testing_* / Testing* for anything wire-visible or artifact-shipping, matching fuz_testing / TestingArgon2idHasher / testing_zzz_server.

Declarations
#

7 declarations

view source

_testing_emit_notifications_action_spec
#

testing_action_specs.ts view source

{ method: string; kind: "request_response"; initiator: "frontend"; auth: { account: "required"; actor: "none"; }; side_effects: false; input: ZodObject<{ count: ZodNumber; }, $strict>; output: ZodObject<...>; async: true; streams: string; description: string; }

_testing_notification_action_spec
#

testing_action_specs.ts view source

{ method: string; kind: "remote_notification"; initiator: "backend"; auth: null; side_effects: true; input: ZodObject<{ index: ZodNumber; }, $strict>; output: ZodVoid; async: true; description: string; }

handle_testing_emit_notifications
#

testing_action_specs.ts view source

(input: { count: number; }, ctx: ActionContext): { count: number; } | Promise<{ count: number; }>

Handler for _testing_emit_notifications. Emits count notifications via ctx.notify.

input

type { count: number; }

ctx

type ActionContext

returns

{ count: number; } | Promise<{ count: number; }>

testing_action_specs
#

testing_action_specs.ts view source

({ method: string; initiator: "both" | "frontend" | "backend"; side_effects: boolean; input: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>; output: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>; ... 6 more ...; rate_limit?: "both" | ... 2 more ... | undefined; } | { ...; } | { ...; ...

Both test specs as a single array — splice into all_action_specs when test mode is on.

TestingEmitNotificationsInput
#

TestingEmitNotificationsOutput
#

TestingNotificationInput
#

Imported by
#