问候Phoenix LiveView向导! 👋
我们有一个基本的LiveView计数器应用:https://github.com/dwyl/phoenix-liveview-counter-tutorial代码很简单:/live/counter.ex
该应用程序按预期运行,请参阅:/live/counter.ex
测试文件为:https://live-view-counter.herokuapp.com我们一直试图在测试中调用test/live_view_counter_web/live/counter_test.exs
函数。因此,我们的项目中有未经测试的代码。这是不可取的。请参阅:test/live_view_counter_web/live/counter_test.exs
handle_info/2
但还不知道该怎么做。我们缺少什么?我们
确实
希望在我们的“实际”项目中使用https://codecov.io/gh/dwyl/phoenix-liveview-counter-tutorial/src/master/lib/live_view_counter_web/live/counter.ex,但我们要确保我们的https://hexdocs.pm/phoenix_live_view/Phoenix.LiveViewTest.html应用已得到[[完全测试。问题我们如何编写LiveView
函数?问候Phoenix LiveView向导! 👋上下文我们有一个基本的LiveView计数器应用程序:https://github.com/dwyl/phoenix-liveview-counter-tutorial该代码非常简单:/live/counter.ex该应用程序...