diff options
author | Markus Wüstenberg | 2020-12-10 13:00:23 +0100 |
---|---|---|
committer | GitHub | 2020-12-10 13:00:23 +0100 |
commit | a76262652b227c95ce140f3698c46f59b79354ac (patch) | |
tree | 15987ad4a4a4f830f0df9fc110faf667fe83514a /attr/boolean_test.go | |
parent | a7e24c6cddaafb98091c3989c9da7779eeba30b5 (diff) | |
download | gomponents-a76262652b227c95ce140f3698c46f59b79354ac.tar.lz gomponents-a76262652b227c95ce140f3698c46f59b79354ac.tar.zst gomponents-a76262652b227c95ce140f3698c46f59b79354ac.zip |
Move elements and attributes into html package (#52)
This makes it easier to use dot-imports. Also updated the readme and examples with new usage, and move the `Classes` helper into the `components` package.
Diffstat (limited to 'attr/boolean_test.go')
-rw-r--r-- | attr/boolean_test.go | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/attr/boolean_test.go b/attr/boolean_test.go deleted file mode 100644 index 309b025..0000000 --- a/attr/boolean_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package attr_test - -import ( - "fmt" - "testing" - - g "github.com/maragudk/gomponents" - "github.com/maragudk/gomponents/assert" - "github.com/maragudk/gomponents/attr" -) - -func TestBooleanAttributes(t *testing.T) { - cases := map[string]func() g.Node{ - "async": attr.Async, - "autofocus": attr.AutoFocus, - "autoplay": attr.AutoPlay, - "controls": attr.Controls, - "defer": attr.Defer, - "disabled": attr.Disabled, - "multiple": attr.Multiple, - "readonly": attr.ReadOnly, - "required": attr.Required, - "selected": attr.Selected, - } - - for name, fn := range cases { - t.Run(fmt.Sprintf("should output %v", name), func(t *testing.T) { - n := g.El("div", fn()) - assert.Equal(t, fmt.Sprintf(`<div %v></div>`, name), n) - }) - } -} |