MCPcopy
hub / github.com/PuerkitoBio/goquery / TestIsFunctionRollback

Function TestIsFunctionRollback

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

Source from the content-addressed store, hash-verified

43}
44
45func TestIsFunctionRollback(t *testing.T) {
46 ok := Doc().Find("div").IsFunction(func(i int, s *Selection) bool {
47 return s.HasClass("container-fluid")
48 })
49
50 if !ok {
51 t.Error("Expected some div to have a container-fluid class.")
52 }
53}
54
55func TestIsSelection(t *testing.T) {
56 sel := Doc().Find("div")

Callers

nothing calls this directly

Calls 4

DocFunction · 0.85
IsFunctionMethod · 0.80
FindMethod · 0.80
HasClassMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…