Mutare.Phoenix.LiveView.Event (mutare_phoenix_live_view v0.1.0)

Copy Markdown View Source

:lv_event — removes Phoenix.LiveView.push_event/3,4, the call that ships a server-initiated event to the client's handleEvent JS hook (push_event(socket, "highlight", %{id: 1}), optionally with trailing options such as dispatch: :before):

push_event(socket, event, payload)         ->  socket
push_event(socket, event, payload, opts)   ->  socket
socket |> push_event(event, payload)       ->  socket

A survivor means no test asserts the event reaches the client. Phoenix.LiveViewTest.assert_push_event/3 is the assertion that kills it.