MCPcopy
hub / github.com/PuerkitoBio/goquery / TestAppendBody

Function TestAppendBody

manipulation_test.go:89–97  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

87}
88
89func TestAppendBody(t *testing.T) {
90 doc := Doc2Clone()
91 doc.Find("body").Append("#nf6")
92
93 assertLength(t, doc.Find("#foot #nf6").Nodes, 0)
94 assertLength(t, doc.Find("#main #nf6").Nodes, 0)
95 assertLength(t, doc.Find("body > #nf6").Nodes, 1)
96 printSel(t, doc.Selection)
97}
98
99func TestAppendSelection(t *testing.T) {
100 doc := Doc2Clone()

Callers

nothing calls this directly

Calls 5

Doc2CloneFunction · 0.85
assertLengthFunction · 0.85
printSelFunction · 0.85
AppendMethod · 0.80
FindMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…