mirror of
https://github.com/tnypxl/rollup.git
synced 2025-12-15 15:03:17 +00:00
test: initialize browser before running ExtractLinks test
This commit is contained in:
@@ -144,6 +144,12 @@ This is a **test** paragraph.
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestExtractLinks(t *testing.T) {
|
func TestExtractLinks(t *testing.T) {
|
||||||
|
// Initialize the browser before running the test
|
||||||
|
if err := InitBrowser(); err != nil {
|
||||||
|
t.Fatalf("Failed to initialize browser: %v", err)
|
||||||
|
}
|
||||||
|
defer CloseBrowser()
|
||||||
|
|
||||||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Content-Type", "text/html")
|
w.Header().Set("Content-Type", "text/html")
|
||||||
w.Write([]byte(`
|
w.Write([]byte(`
|
||||||
|
|||||||
Reference in New Issue
Block a user