MCPcopy Create free account
hub / github.com/GuyARoss/orbit / TestInnerHTML

Function TestInnerHTML

examples/basic-react/orbitgen/orb_test.go:12–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10 "testing"
11)
12func TestInnerHTML(t *testing.T) {
13 var tt = []struct {
14 f string
15 s string
16 t string
17 e string
18 }{
19 {"<thing>DATA</blah>", "<thing>", "</blah>", "DATA"},
20 }
21 for _, d := range tt {
22 c := innerHTML(d.f, d.s, d.t)
23 if !strings.Contains(c, d.e) {
24 t.Errorf("expected %s got %s", d.e, c)
25 }
26 }
27}
28func TestParseSlug(t *testing.T) {
29 var tt = []struct {
30 path string

Callers

nothing calls this directly

Calls 2

ContainsMethod · 0.80
innerHTMLFunction · 0.70

Tested by

no test coverage detected