diff --git a/helpers/content_test.go b/helpers/content_test.go index 44cee2f50..e2410cedd 100644 --- a/helpers/content_test.go +++ b/helpers/content_test.go @@ -7,6 +7,8 @@ import ( "testing" ) +const tstHtmlContent = "
content foobar. Follow up

This is some text.
And some more.

" + func TestStripHTML(t *testing.T) { type test struct { input, expected string @@ -26,6 +28,13 @@ func TestStripHTML(t *testing.T) { } } +func BenchmarkStripHTML(b *testing.B) { + b.ResetTimer() + for i := 0; i < b.N; i++ { + StripHTML(tstHtmlContent) + } +} + func TestStripEmptyNav(t *testing.T) { cleaned := StripEmptyNav([]byte("do\n\nbedobedo")) assert.Equal(t, []byte("dobedobedo"), cleaned)