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

Function TestIsPositionalNot

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

Source from the content-addressed store, hash-verified

26}
27
28func TestIsPositionalNot(t *testing.T) {
29 sel := Doc().Find(".footer p:nth-child(1)")
30 if sel.Is("p:nth-child(2)") {
31 t.Error("Expected .footer p:nth-child(1) NOT to be p:nth-child(2).")
32 }
33}
34
35func TestIsFunction(t *testing.T) {
36 ok := Doc().Find("div").IsFunction(func(i int, s *Selection) bool {

Callers

nothing calls this directly

Calls 3

DocFunction · 0.85
FindMethod · 0.80
IsMethod · 0.80

Tested by

no test coverage detected