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

Function TestExtractImageURLsTrixFigure

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

Source from the content-addressed store, hash-verified

126 }
127 })
128 }
129}
130
131func TestToTextImgTag(t *testing.T) {
132 got := ToText(`<p>Before</p><img src="test.png" alt="photo"><p>After</p>`)
133 if !strings.Contains(got, "[photo]") {
134 t.Errorf("ToText should render img alt text, got %q", got)
135 }
136 if !strings.Contains(got, "Before") || !strings.Contains(got, "After") {
137 t.Errorf("ToText should include surrounding text, got %q", got)
138 }
139}
140

Callers

nothing calls this directly

Calls 1

ExtractImageURLsFunction · 0.85

Tested by

no test coverage detected