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

Function TestIsPositional

query_test.go:21–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestIsPositional(t *testing.T) {
22 sel := Doc().Find(".footer p:nth-child(2)")
23 if !sel.Is("p:nth-child(2)") {
24 t.Error("Expected .footer p:nth-child(2) to be p:nth-child(2).")
25 }
26}
27
28func TestIsPositionalNot(t *testing.T) {
29 sel := Doc().Find(".footer p:nth-child(1)")

Callers

nothing calls this directly

Calls 3

DocFunction · 0.85
FindMethod · 0.80
IsMethod · 0.80

Tested by

no test coverage detected