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

Function TestIndexSelectorInvalid

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

Source from the content-addressed store, hash-verified

205}
206
207func TestIndexSelectorInvalid(t *testing.T) {
208 sel := Doc().Find(".hero-unit")
209 if i := sel.IndexSelector(""); i != -1 {
210 t.Errorf("Expected index of -1, got %v.", i)
211 }
212}
213
214func TestIndexOfNode(t *testing.T) {
215 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