 (ns clj-chrome-devtools.impl.connection-test
-  (:require [clj-chrome-devtools.automation :refer [create-automation current-automation evaluate]]
+  (:require [clj-chrome-devtools.automation :refer [create-automation current-automation evaluate
+                                                    sel text-of to]]
             [clj-chrome-devtools.automation.fixture :refer [create-chrome-fixture]]
             [clj-chrome-devtools.impl.connection :as c]
             [clj-chrome-devtools.impl.util :as util]
+            [clojure.java.io :as io]
             [clojure.spec.test.alpha :as stest]
             [clojure.string :refer [includes? join]]
             [clojure.test :as t :refer [deftest is testing]]
-            [taoensso.timbre :as log]))
+            [taoensso.timbre :as log])
+  (:import [org.eclipse.jetty.websocket.api WebSocketException]))
 
 (stest/instrument)
 

                      output))
          (is (re-seq #".+WARN.+WebSocket connection closed with status code 1009 \(Too large\) and reason: Text message size.+exceeds maximum size.+"
                      output)))))))

                                                   (swap! log conj formatted-output-str)))}}})
    log))

(defn- make-conn
  "The main reason we need this is so it’ll use the value of the port var. See the comment on that
  var above."
  ([] (make-conn {}))
  ([client-config]
   (let [client (c/make-ws-client client-config)
         max-wait-time-ms 1000]
     (c/connect "localhost" port max-wait-time-ms client))))

(deftest logging
  (testing "messages that are larger than the max should cause an error to be logged"
