test: initialize browser before running ExtractLinks test

This commit is contained in:
Arik Jones (aider)
2024-09-21 16:01:08 -05:00
parent e5d4c514a7
commit de84d68b4c

View File

@@ -144,6 +144,12 @@ This is a **test** paragraph.
}
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) {
w.Header().Set("Content-Type", "text/html")
w.Write([]byte(`