        :private true}
   final-test-report-pattern #"(\d+) failures, (\d+) errors.")
 
-(defn- assert-test-result [msg]
+(defn- test-result [msg]
   (let [[match errors failures] (re-matches final-test-report-pattern msg)]
     (when match
-      (assert (= "0" errors failures)
-              "ClojureScript tests had failures or errors, see previous output for details.")
-      true)))
+      (if (= "0" errors failures)
+        :ok
+        :fail
+        ;"ClojureScript tests had failures or errors, see previous output for details."
+        ))))
 
 (defn- poll-test-execution []
   (loop [started? false

      (when video-name
        (let [input (str video-name "-%d.png")
              output (str video-name ".png")
              cmd ["ffmpeg" "-framerate" (str framerate) "-y" "-i" input "-f" "apng" "-plays" "0" output]]
          (println "Generate video " output)
          (let [{exit :exit err :err} (apply sh/sh cmd)]
            (if (zero? exit)

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

          (if-let [result (some test-result msgs)]
            {:result result
             :screenshots screenshots}
            (do
              (Thread/sleep 100)
              (recur started? screenshots))))))))

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