Skip to content

LiveView test fails with a Diff.many_to_iodata/5 matching errorΒ #87

@cblavier

Description

@cblavier

Environment

  • Elixir version (elixir -v): 1.11.1
  • Phoenix version (mix deps): 1.5.8
  • Phoenix LiveView version (mix deps): 0.15.4
  • Operating system: Ubuntu / MacOS

Actual behavior

Running test with a slim template fails with a Diff.many_to_iodata/5 error:

** (FunctionClauseError) no function clause matching in Phoenix.LiveView.Diff.many_to_iodata/5
    (phoenix_live_view 0.15.4) lib/phoenix_live_view/diff.ex:74: Phoenix.LiveView.Diff.many_to_iodata(["", ""], [], ["media-1", " "], %{}, #Function<13.114466470/2 in Phoenix.LiveViewTest.DOM.render_diff/1>)

The exact same template converted in eex does not fail.

You can reproduce the error with the following repo: https://github.com/rlecostey/liveview_diff_issue
mix test runs two tests: one with eex template and another with the slim template, only the latest triggers the error

I tried debugging within Phoenix.LiveView.Diff but I had a hard time figuring out how exactly this is working πŸ˜…

Thanks for your help!

(already opened and closed here: phoenixframework/phoenix_live_view#1391)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions