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

Function TestIndex

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

Source from the content-addressed store, hash-verified

191}
192
193func TestIndex(t *testing.T) {
194 sel := Doc().Find(".pvk-content")
195 if i := sel.Index(); i != 1 {
196 t.Errorf("Expected index of 1, got %v.", i)
197 }
198}
199
200func TestIndexSelector(t *testing.T) {
201 sel := Doc().Find(".hero-unit")

Callers

nothing calls this directly

Calls 3

DocFunction · 0.85
FindMethod · 0.80
IndexMethod · 0.80

Tested by

no test coverage detected