(ns emptyhead.test.fixtures
  (:require [cljs.test :as t :include-macros true]
            [emptyhead.idea.state :as s]))

(defn temporary-state [tests]
  (let [orig-state (swap! s/state identity)]
      (s/reset-state!)
      (tests)
      (reset! s/state orig-state)))

(defn pre-reset [tests]
  (s/reset-state!)
  (tests))
