MCPcopy Create free account
hub / github.com/antchfx/htmlquery / TestLoadURL

Function TestLoadURL

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

Source from the content-addressed store, hash-verified

70}
71
72func TestLoadURL(t *testing.T) {
73 ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
74 fmt.Fprint(w, htmlSample)
75 }))
76 defer ts.Close()
77
78 _, err := LoadURL(ts.URL)
79 if err != nil {
80 t.Fatal(err)
81 }
82}
83
84func TestLoadURLWithGzipResponse(t *testing.T) {
85 ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Callers

nothing calls this directly

Calls 1

LoadURLFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…