testing/cross_backend/rooms_ws.ts

Cross-process rooms suite — the WebSocket-only room verbs (create_room_actions) and the notifications their registry fans out, held to one wire on both spines.

Runs against a backend mounting the room verbs on ws_path over an exclusive registry with the test room authorizer (test_room_authorize, the twin of the Rust stub's TestRoomAuthorize: the room id's prefix picks the rule) and the room limiter at its defaults — what capabilities.rooms declares. Each case names fresh rooms, so no case reads another's; the per-test _testing_reset drops every room besides.

Pinned: join, leave, send, state, and watch round trips, with each event's shape and its room's seq in order; an event never reaches the seat that caused it; the refusals' codes and reasons (room_not_found for a denial and a missing room alike, the invalid room id as the input schema's reasonless refusal, room_not_joined, room_member_not_found, the payload and state bounds, room_full, room_watch_limit, and method_not_found over HTTP); exclusivity (one seat per actor, the newest admitted winning, the displaced seat told room_seat_lost with moved_to) and the rejoin tombstone (room_seat_moved); eviction through _testing_room_evict, which ends seats and watches alike; a closed socket's seat leaving as disconnected; the per-connection limiter's rate_limited, charged by escaped bytes, with a watch and a leave still answered past the byte budget. Error messages are not compared — codes and data.reason are the contract. The room verbs' action-manifest entries (transport: 'ws') are the manifest parity gate's.

Gated on capabilities.ws and capabilities.rooms. A backend declaring rooms declares _testing_room_evict too, which the eviction case drives and describe_spine_cross_suites requires. Cross-process only.

view source

Declarations
#

2 declarations

describe_rooms_ws_cross_tests
#

RoomsWsCrossTestOptions
#

testing/cross_backend/rooms_ws.ts view source

RoomsWsCrossTestOptions import type {RoomsWsCrossTestOptions} from '@fuzdev/fuz_app/testing/cross_backend/rooms_ws.js';

inheritance

setup_test

Per-test fixture producer (default_cross_process_setup(handle)).

type (): Promise<TestFixture>

readonly
returns Promise<TestFixture>

capabilities

Backend capability flags; every case gates on ws and rooms.

type BackendCapabilities

readonly

rpc_path?

JSON-RPC endpoint path. Default SPINE_RPC_PATH.

type string

readonly

Depends on
#

Imported by
#