diff --git a/helpers/content_test.go b/helpers/content_test.go index e2bf501d2..53e18e727 100644 --- a/helpers/content_test.go +++ b/helpers/content_test.go @@ -50,6 +50,14 @@ func TestTrimShortHTML(t *testing.T) { } } +func BenchmarkTrimShortHTML(b *testing.B) { + c := newTestContentSpec(nil) + b.ResetTimer() + for i := 0; i < b.N; i++ { + c.TrimShortHTML([]byte("

Simple paragraph

")) + } +} + func TestBytesToHTML(t *testing.T) { c := qt.New(t) c.Assert(helpers.BytesToHTML([]byte("dobedobedo")), qt.Equals, template.HTML("dobedobedo"))