MCPcopy Create free account
hub / github.com/PuerkitoBio/goquery / TestIndexOfNode

Function TestIndexOfNode

array_test.go:225–230  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

223}
224
225func TestIndexOfNode(t *testing.T) {
226 sel := Doc().Find("div.pvk-gutter")
227 if i := sel.IndexOfNode(sel.Nodes[1]); i != 1 {
228 t.Errorf("Expected index of 1, got %v.", i)
229 }
230}
231
232func TestIndexOfNilNode(t *testing.T) {
233 sel := Doc().Find("div.pvk-gutter")

Callers

nothing calls this directly

Calls 3

DocFunction · 0.85
FindMethod · 0.80
IndexOfNodeMethod · 0.80

Tested by

no test coverage detected