package template_test import ( "sync" "testing" "github.com/stretchr/testify/assert" "gh.tarampamp.am/error-pages/internal/template" ) func TestMiniHTML(t *testing.T) { t.Parallel() var wg sync.WaitGroup for range 100 { // race condition provocation wg.Add(1) go func() { defer wg.Done() for give, want := range map[string]string{ "": "", ` Test

Test

`: `Test

Test

`, `

Text

`: `

Text

`, ` `: ``, ` `: ``, ` `: ``, } { var got, err = template.MiniHTML(give) assert.NoError(t, err) assert.Equal(t, want, got) } }() } wg.Wait() }