Write Tests for a LiveView
Let's test our LiveView with some basic tests.
We'll cover the following...
Testing LiveView
LiveView, like Channels, provides test helpers that allow us to write meaningful tests for our LiveView module quickly. The Phoenix.LiveViewTest
module offers all the helpers we need to start writing tests.
Our LiveView is pretty simple because it doesn’t respond to front-end events. Our tests will be basic because of this. ...