Floki encodes special characters in LiveView tests unless encode_raw_html is off
February 15, 2024
Floki, the HTML parser LiveViewTest uses, encodes certain characters by default. Faker, a library for fake test data, sometimes generates data with special characters, so the two can conflict in test assertions.
To stop Floki from encoding HTML special chars, just add this:
# config/test.exs
config :floki, :encode_raw_html, false