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

Function assertClass

type_test.go:73–77  ·  view source on GitHub ↗
(t *testing.T, sel *Selection, class string)

Source from the content-addressed store, hash-verified

71}
72
73func assertClass(t *testing.T, sel *Selection, class string) {
74 if !sel.HasClass(class) {
75 t.Errorf("Expected node to have class %s, found %+v.", class, sel.Get(0))
76 }
77}
78
79func assertPanic(t *testing.T) {
80 if e := recover(); e == nil {

Callers 14

TestAfterHtmlContextFunction · 0.85
TestAppendHtmlContextFunction · 0.85
TestBeforeHtmlContextFunction · 0.85
TestPrependHtmlContextFunction · 0.85
TestParentFilteredFunction · 0.85
TestPrevFunction · 0.85
TestClosestNoDupesFunction · 0.85
TestClosestNodesNoDupesFunction · 0.85

Calls 2

HasClassMethod · 0.80
GetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…