[READ-ONLY] Mirror of https://github.com/andrioid/humle. Write HTML with Go functions
1package humle_test
2
3import (
4 "testing"
5
6 h "github.com/andrioid/humle"
7)
8
9func basicLayout() *h.Component {
10 return h.NewComponent("basic-layout", func() h.Node {
11 return h.Div(h.Text("Hello"))
12 })
13}
14
15var testMatrixComponents = h.TestCases{
16 "component": h.TestCase{
17 Input: basicLayout(),
18 Expected: `<div>Hello</div>`,
19 },
20}
21
22func TestComponents(t *testing.T) {
23 testMatrixComponents.Test(t)
24}