I have a hook that fetch select options on user input, and values are passed to an external js library.
This hook uses
pushEvent(event, payload), where
payload is a string, such as
unsigned_params received on facing liveview in
handle_event/3 is the payload :
I can not use
Phoenix.LiveViewTest.render_hook/3 to test this hook, as there is a guard clause on the value:
So I can write hook and liveview that sends and receive a
"bar" payload, but I can not write a test for it?
What do you think on the datatype of Phoenix.LiveView.handle_event/3? Could
unsigned_params datatype be unioned with string and number?