MCPcopy Create free account
hub / github.com/basecamp/hey-cli / TestToTextList

Function TestToTextList

internal/htmlutil/htmlutil_test.go:29–37  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27}
28
29func TestToTextList(t *testing.T) {
30 got := ToText("<ul><li>one</li><li>two</li></ul>")
31 if !strings.Contains(got, "• one") {
32 t.Errorf("ToText list = %q, should contain bullet items", got)
33 }
34 if !strings.Contains(got, "• two") {
35 t.Errorf("ToText list = %q, should contain second bullet", got)
36 }
37}
38
39func TestToTextStripsEntities(t *testing.T) {
40 got := ToText("&amp; &lt; &gt;")

Callers

nothing calls this directly

Calls 1

ToTextFunction · 0.85

Tested by

no test coverage detected