Skip to content

Commit

Permalink
accept n/a as tags output
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdata committed Feb 28, 2024
1 parent 0e4b501 commit a58feaf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ui_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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()))
}

Expand Down

0 comments on commit a58feaf

Please sign in to comment.