             [clj-chrome-devtools.impl.util :refer [random-free-port]]
             [org.httpkit.server :as http-server]
             [clojure.string :as str]
-            [clojure.test]
+            [clojure.test :refer [is]]
             [clojure.java.shell :as sh])
   (:import (java.io File)))
 

          (doseq [m (mapcat #(str/split % #"\n") msgs)]
            (println "[CLJS]" m))

          (if-not (some assert-test-result msgs)
            (do
              (Thread/sleep 100)
              (recur started? screenshots))
            screenshots))))))

(defn output-screenshot-videos [screenshots framerate]
  (let [video-names (into #{}
                          (keep #(second (re-matches #"^([^\d]+)-(\d+)\.png$" %)))
                          screenshots)]

            (automation/to url)

            (log "Wait for test output")
            (let [{:keys [result screenshots]} (poll-test-execution)]
              (when screenshot-video?
                (output-screenshot-videos screenshots (or framerate 2) loop-video?))
              (is (= result :ok)
                  "ClojureScript tests had failures or errors, see previous output for details "))

            (log "Tests done, cleanup")
            (server)
