mirror of https://github.com/status-im/reagent.git
Rerun tests by clicking on test results
This commit is contained in:
parent
e801b8e29a
commit
8ff44c81e6
|
@ -32,9 +32,16 @@
|
|||
(+ (:pass m) (:fail m) (:error m)) "assertions.")
|
||||
(println (:fail m) "failures," (:error m) "errors."))
|
||||
|
||||
(defn run-tests []
|
||||
(reset! test-results nil)
|
||||
(if r/is-client
|
||||
(js/setTimeout all-tests 100)
|
||||
(all-tests)))
|
||||
|
||||
(defn test-output-mini []
|
||||
(let [res @test-results]
|
||||
[:div {:style test-box-style}
|
||||
[:div {:style test-box-style
|
||||
:on-click run-tests}
|
||||
(if res
|
||||
(if (zero? (+ (:fail res) (:error res)))
|
||||
"All tests ok"
|
||||
|
@ -42,12 +49,6 @@
|
|||
(:fail res) " failures, " (:error res) " errors."])
|
||||
"testing")]))
|
||||
|
||||
(defn run-tests []
|
||||
(reset! test-results nil)
|
||||
(if r/is-client
|
||||
(js/setTimeout all-tests 100)
|
||||
(all-tests)))
|
||||
|
||||
(defn init! []
|
||||
(when (some? (test/deftest empty-test))
|
||||
;; Only run with :load-tests true
|
||||
|
|
Loading…
Reference in New Issue