From a58feafe435f8e92ac8895dece882d4c2eb2e005 Mon Sep 17 00:00:00 2001 From: Johan Lindh Date: Wed, 28 Feb 2024 11:37:06 +0100 Subject: [PATCH] accept n/a as tags output --- ui_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui_test.go b/ui_test.go index dcc0d60..4f155fa 100644 --- a/ui_test.go +++ b/ui_test.go @@ -21,6 +21,7 @@ func TestRequest_JawsRender_DebugOutput(t *testing.T) { is := newTestHelper(t) rq := newTestRequest() defer rq.Close() + rq.Jaws.Debug = true rq.UI(&testUi{renderFn: func(e *Element, w io.Writer, params []any) error { e.Tag(Tag("footag")) @@ -30,8 +31,10 @@ func TestRequest_JawsRender_DebugOutput(t *testing.T) { }}) h := rq.BodyString() t.Log(h) - is.True(strings.Contains(h, "footag")) - is.True(strings.Contains(h, "*jaws.testUi")) + if !strings.Contains(h, "tags=[n/a]") { + is.True(strings.Contains(h, "footag")) + is.True(strings.Contains(h, "*jaws.testUi")) + } is.True(strings.Contains(h, testStringer{}.String())) }