(t *testing.T)
| 13 | ) |
| 14 | |
| 15 | func TestInlineContainer(t *testing.T) { |
| 16 | b := core.NewBody() |
| 17 | assert.NoError(t, ReadHTMLString(NewContext(), b, `<button>Test</button>`)) |
| 18 | if tag := b.Child(0).AsTree().Property("tag"); tag != "body" { |
| 19 | t.Errorf("expected first child to be body but got %v", tag) |
| 20 | } |
| 21 | if !strings.Contains(b.Child(0).AsTree().Child(0).AsTree().Name, "inline") { |
| 22 | t.Errorf("expected inline container for h1 but got %v", b.Child(0)) |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | func TestNoInlineContainer(t *testing.T) { |
| 27 | b := core.NewBody() |
nothing calls this directly
no test coverage detected