From a76262652b227c95ce140f3698c46f59b79354ac Mon Sep 17 00:00:00 2001 From: Markus Wüstenberg Date: Thu, 10 Dec 2020 13:00:23 +0100 Subject: 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.--- el/text_test.go | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 el/text_test.go (limited to 'el/text_test.go') diff --git a/el/text_test.go b/el/text_test.go deleted file mode 100644 index a751e19..0000000 --- a/el/text_test.go +++ /dev/null @@ -1,52 +0,0 @@ -package el_test - -import ( - "fmt" - "testing" - - g "github.com/maragudk/gomponents" - "github.com/maragudk/gomponents/assert" - "github.com/maragudk/gomponents/el" -) - -func TestTextElements(t *testing.T) { - cases := map[string]func(string, ...g.Node) g.NodeFunc{ - "abbr": el.Abbr, - "b": el.B, - "caption": el.Caption, - "dd": el.Dd, - "del": el.Del, - "dfn": el.Dfn, - "dt": el.Dt, - "em": el.Em, - "figcaption": el.FigCaption, - "h1": el.H1, - "h2": el.H2, - "h3": el.H3, - "h4": el.H4, - "h5": el.H5, - "h6": el.H6, - "i": el.I, - "ins": el.Ins, - "kbd": el.Kbd, - "mark": el.Mark, - "q": el.Q, - "s": el.S, - "samp": el.Samp, - "small": el.Small, - "strong": el.Strong, - "sub": el.Sub, - "sup": el.Sup, - "time": el.Time, - "title": el.Title, - "u": el.U, - "var": el.Var, - } - - for name, fn := range cases { - t.Run(fmt.Sprintf("should output %v", name), func(t *testing.T) { - n := fn("hat", g.Attr("id", "hat")) - assert.Equal(t, fmt.Sprintf(`<%v id="hat">hat`, name, name), n) - }) - } -} -- cgit 1.4.1