Jump. CredoChecks. AssertElementSelectorCanNeverFail
(Jump.CredoChecks v0.4.0)
View Source
Basics
This check is disabled by default.
Learn how to enable it via .credo.exs.
This check has a base priority of high and works with any version of Elixir.
Explanation
Asserting on a LiveViewTest.element/{2,3} call can never fail, since when the selector has no results, the function returns the empty list.
Instead, use LiveViewTest.has_element?{1,3}.
Check-Specific Parameters
There are no specific parameters for this check.
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs config file.