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

Function TestAfterSelection

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

Source from the content-addressed store, hash-verified

40}
41
42func TestAfterSelection(t *testing.T) {
43 doc := Doc2Clone()
44 doc.Find("#main").AfterSelection(doc.Find("#nf1, #nf2"))
45
46 assertLength(t, doc.Find("#main #nf1, #main #nf2").Nodes, 0)
47 assertLength(t, doc.Find("#foot #nf1, #foot #nf2").Nodes, 0)
48 assertLength(t, doc.Find("#main + #nf1, #nf1 + #nf2").Nodes, 2)
49 printSel(t, doc.Selection)
50}
51
52func TestAfterHtml(t *testing.T) {
53 doc := Doc2Clone()

Callers

nothing calls this directly

Calls 5

Doc2CloneFunction · 0.85
assertLengthFunction · 0.85
printSelFunction · 0.85
AfterSelectionMethod · 0.80
FindMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…