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

Function TestIndexOfNilNode

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

Source from the content-addressed store, hash-verified

230}
231
232func TestIndexOfNilNode(t *testing.T) {
233 sel := Doc().Find("div.pvk-gutter")
234 if i := sel.IndexOfNode(nil); i != -1 {
235 t.Errorf("Expected index of -1, got %v.", i)
236 }
237}
238
239func TestIndexOfSelection(t *testing.T) {
240 sel := Doc().Find("div")

Callers

nothing calls this directly

Calls 3

DocFunction · 0.85
FindMethod · 0.80
IndexOfNodeMethod · 0.80

Tested by

no test coverage detected