diff options
author | Markus Wüstenberg | 2022-11-03 11:32:16 +0100 |
---|---|---|
committer | GitHub | 2022-11-03 11:32:16 +0100 |
commit | b12942fb32082729e862eb53b8c3962534561e83 (patch) | |
tree | 19ac18495f6adfb46bf70c67fd721bf7eb7b4e3c /components/elements_test.go | |
parent | 3bb4e3efeac645acc02781af59a1399f6f8e0795 (diff) | |
download | gomponents-b12942fb32082729e862eb53b8c3962534561e83.tar.lz gomponents-b12942fb32082729e862eb53b8c3962534561e83.tar.zst gomponents-b12942fb32082729e862eb53b8c3962534561e83.zip |
Delete low-value helper components (#115)
I'd rather reserve the package for components that have proven repeatedly useful, like `Classes` and `HTML5`.
Diffstat (limited to 'components/elements_test.go')
-rw-r--r-- | components/elements_test.go | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/components/elements_test.go b/components/elements_test.go deleted file mode 100644 index 7afa7db..0000000 --- a/components/elements_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package components_test - -import ( - "testing" - - g "github.com/maragudk/gomponents" - c "github.com/maragudk/gomponents/components" - "github.com/maragudk/gomponents/internal/assert" -) - -func TestInputHidden(t *testing.T) { - t.Run("returns an input element with type hidden, and the given name and value", func(t *testing.T) { - n := c.InputHidden("id", "partyhat", g.Attr("class", "hat")) - assert.Equal(t, `<input type="hidden" name="id" value="partyhat" class="hat">`, n) - }) -} - -func TestLinkStylesheet(t *testing.T) { - t.Run("returns a link element with rel stylesheet and the given href", func(t *testing.T) { - n := c.LinkStylesheet("style.css", g.Attr("media", "print")) - assert.Equal(t, `<link rel="stylesheet" href="style.css" media="print">`, n) - }) -} - -func TestLinkPreload(t *testing.T) { - t.Run("returns a link element with rel preload and the given href and as", func(t *testing.T) { - n := c.LinkPreload("party.woff2", "font", g.Attr("type", "font/woff2")) - assert.Equal(t, `<link rel="preload" href="party.woff2" as="font" type="font/woff2">`, n) - }) -} |