Test helpers that exercise the same transport callbacks as a real connection.
The returned socket value is opaque transport state. frames always contains
{:text, binary} tuples, matching the WebSocket wire contract.
Summary
Functions
Connects and mounts a socket module through its real callbacks.
Sends one raw binary frame.
Sends an event using the htmx 4 JSON frame shape.
Sends one raw text frame, including malformed JSON.
Delivers a process message through the real transport callback.
Returns the public socket state for assertions.
Terminates the transport state through the real callback.
Types
Functions
@spec connect( module(), keyword() ) :: {:ok, t()} | {:stop, term(), t()} | :error | {:error, term()}
Connects and mounts a socket module through its real callbacks.
Sends one raw binary frame.
Sends an event using the htmx 4 JSON frame shape.
Sends one raw text frame, including malformed JSON.
Delivers a process message through the real transport callback.
@spec socket(t()) :: PhoenixHtmxWs.Socket.t()
Returns the public socket state for assertions.
Terminates the transport state through the real callback.