     [re-frame.core :as re-frame]
     [re-frame.fx]
     [re-frame.interop :refer [set-timeout!]]
-    [re-frame.loggers :as log]))
+    [re-frame.loggers :as log]
+    [clojure.string :as str]))
 
 ;; ---- FIXTURES ---------------------------------------------------------------
 

      ;; kick off main handler
      (re-frame/dispatch [::later-test]))))

(deftest report-missing-handler
  (let [logs (atom [])
        log-fn (fn[& args] (swap! logs  #(conj % (clojure.string/join args))))
        logger (zipmap [:log :warn :error] (repeat log-fn))]
    (log/set-loggers! logger)

    (re-frame/reg-event-fx
     ::missing-handler-test
     (fn[_world _event-v]
       {:dispatch [:do-not-exist :handler]}))

    (re-frame/dispatch [::missing-handler-test])

    (async done
           (set-timeout!
            (fn []
              (is (re-matches #"re-frame: no :event handler.*:do-not-exist" (first @logs)))
              (done))
            2))))

    {:before #(reset! restore-re-frame (re-frame.core/make-restore-fn))
     :after  #(@restore-re-frame)}))

(use-fixtures :each (fixture-re-frame))

;; ---- TESTS ------------------------------------------------------------------

