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

Function TestGetNegative

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

Source from the content-addressed store, hash-verified

188}
189
190func TestGetNegative(t *testing.T) {
191 sel := Doc().Find(".pvk-content")
192 node := sel.Get(-3)
193 if sel.Nodes[0] != node {
194 t.Errorf("Expected node %v to be %v.", node, sel.Nodes[0])
195 }
196}
197
198func TestGetInvalid(t *testing.T) {
199 defer assertPanic(t)

Callers

nothing calls this directly

Calls 3

DocFunction · 0.85
FindMethod · 0.80
GetMethod · 0.80

Tested by

no test coverage detected