about summary refs log tree commit diff stats
path: root/gomponents_generic_test.go
diff options
context:
space:
mode:
authorMarkus Wüstenberg2024-09-19 19:33:58 +0200
committerGitHub2024-09-19 19:33:58 +0200
commit69b0da41dff1813f3939cf4ea09fbbb2d06b7719 (patch)
tree5c2eb3befabf9d666691a20f65d79513c5821e11 /gomponents_generic_test.go
parentc97605aca761985ac45adfe19365801ec2682657 (diff)
downloadgomponents-69b0da41dff1813f3939cf4ea09fbbb2d06b7719.tar.lz
gomponents-69b0da41dff1813f3939cf4ea09fbbb2d06b7719.tar.zst
gomponents-69b0da41dff1813f3939cf4ea09fbbb2d06b7719.zip
Drop support for Go 1.16 and Go 1.17 (#203)
Fixes #184
Diffstat (limited to 'gomponents_generic_test.go')
-rw-r--r--gomponents_generic_test.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/gomponents_generic_test.go b/gomponents_generic_test.go
deleted file mode 100644
index 0492ae3..0000000
--- a/gomponents_generic_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-//go:build go1.18
-// +build go1.18
-
-package gomponents_test
-
-import (
-	"os"
-	"testing"
-
-	g "github.com/maragudk/gomponents"
-	"github.com/maragudk/gomponents/internal/assert"
-)
-
-func TestMap(t *testing.T) {
-	t.Run("maps slices to nodes", func(t *testing.T) {
-		items := []string{"hat", "partyhat", "turtlehat"}
-		lis := g.Map(items, func(i string) g.Node {
-			return g.El("li", g.Text(i))
-		})
-
-		list := g.El("ul", lis...)
-
-		assert.Equal(t, `<ul><li>hat</li><li>partyhat</li><li>turtlehat</li></ul>`, list)
-	})
-}
-
-func ExampleMap() {
-	items := []string{"party hat", "super hat"}
-	e := g.El("ul", g.Group(g.Map(items, func(i string) g.Node {
-		return g.El("li", g.Text(i))
-	})))
-	_ = e.Render(os.Stdout)
-	// Output: <ul><li>party hat</li><li>super hat</li></ul>
-}