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

Function TestAfterHtml

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

Source from the content-addressed store, hash-verified

50}
51
52func TestAfterHtml(t *testing.T) {
53 doc := Doc2Clone()
54 doc.Find("#main").AfterHtml("<strong>new node</strong>")
55
56 assertLength(t, doc.Find("#main + strong").Nodes, 1)
57 printSel(t, doc.Selection)
58}
59
60func TestAfterHtmlContext(t *testing.T) {
61 doc := loadString(t, `

Callers

nothing calls this directly

Calls 5

Doc2CloneFunction · 0.85
assertLengthFunction · 0.85
printSelFunction · 0.85
AfterHtmlMethod · 0.80
FindMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…