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

Function TestIndexSelectorInvalid

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

Source from the content-addressed store, hash-verified

216}
217
218func TestIndexSelectorInvalid(t *testing.T) {
219 sel := Doc().Find(".hero-unit")
220 if i := sel.IndexSelector(""); i != -1 {
221 t.Errorf("Expected index of -1, got %v.", i)
222 }
223}
224
225func TestIndexOfNode(t *testing.T) {
226 sel := Doc().Find("div.pvk-gutter")

Callers

nothing calls this directly

Calls 3

DocFunction · 0.85
FindMethod · 0.80
IndexSelectorMethod · 0.80

Tested by

no test coverage detected