livebook/test/livebook_web/helpers_test.exs
Jonatan Kłosko c6f9c54f31
Buffer IO evaluation output (#156)
* Buffer IO evaluation output

* Respect CR in IOProxy

* Handle CR when adding cell output rather than during each render

* Optimise CR handling in buffer
2021-04-12 17:56:40 +02:00

15 lines
471 B
Elixir

defmodule LivebookWeb.HelpersTest do
use ExUnit.Case, async: true
alias LivebookWeb.Helpers
describe "ansi_to_html_lines/1" do
test "puts every line in its own tag" do
assert [
{:safe, ~s{<span style="color: var(--ansi-color-blue);">smiley</span>}},
{:safe, ~s{<span style="color: var(--ansi-color-blue);">cat</span>}}
] ==
Helpers.ansi_to_html_lines("\e[34msmiley\ncat\e[0m")
end
end
end