ページの mount / イベント / レンダリングを GenServer や WebSocket を起動せずに 直接テストするためのヘルパー。
Summary
Functions
ページを mount して {assigns, rendered_html} を返す。
assigns を渡して HTML 文字列を返す。
handle_event を呼び出して {result_tuple, rendered_html} を返す。
handle_info を呼び出して {result_tuple, rendered_html} を返す。
Functions
ページを mount して {assigns, rendered_html} を返す。
{assigns, html} = Dialup.Test.mount_page(MyApp.App.Page)
assert assigns.count == 0
assigns を渡して HTML 文字列を返す。
handle_event を呼び出して {result_tuple, rendered_html} を返す。
{{:patch, "counter", _rendered, new_assigns}, _html} =
Dialup.Test.send_event(MyApp.App.Page, "increment", "", assigns)
handle_info を呼び出して {result_tuple, rendered_html} を返す。