      (binding [*out* writer
                *frame-options* (:frame-options options *frame-options*)
                clojure.test/*test-out* writer
-               *test-runner-state* (atom [])]
+               *test-runner-state* (atom {})]
        (clear-screen options)
        (let [f (start-flusher (:flush-interval options 10))
              t0 (System/nanoTime)

(defn format-slow-tests [results options]
  (let [slowest (->> results
                  :test-runner-state
                  (sort-by :runtime)
                  reverse
                  (take (:slow-test-count options 10)))]

      (gather-tests-from-ns queue n))
    queue))

(defn prioritize-test [[test-var _ _ :as test-run] mapped-results]
  (let [previous-result (get mapped-results (str test-var))]
    [(if (nil? previous-result) 0)
     (if (#{:error :fail} (:result-type previous-result)) (:runtime previous-result))
     (:runtime previous-result)]))

(defn prioritize-tests [tests]
  (if-let [results @state/*previous-test-run*]
    (let [mapped-results (into {} (map (fn [[k v]] [(str k) v]) results))
          prioritized
          (reverse
            (sort-by
              #(prioritize-test % mapped-results)
              tests))]
      prioritized)
    tests))

(defn pour-tests-to-queue [tests]
