From b81af9308a13ddd470ffcf3ea55ff21b40158f79 Mon Sep 17 00:00:00 2001 From: Juho Teperi Date: Fri, 13 Oct 2017 16:00:04 +0300 Subject: [PATCH] Fix doo & test result component on demo app --- demo/reagentdemo/core.cljs | 6 ++++-- test/reagenttest/runtests.cljs | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/demo/reagentdemo/core.cljs b/demo/reagentdemo/core.cljs index d786c4d..6245034 100644 --- a/demo/reagentdemo/core.cljs +++ b/demo/reagentdemo/core.cljs @@ -6,7 +6,8 @@ [reagentdemo.intro :as intro] [reagentdemo.news :as news] [reagenttest.runtests :as tests] - [reagent.debug :refer-macros [dbg println]])) + [reagent.debug :refer-macros [dbg println]] + [doo.runner :as doo])) (def github {:href "https://github.com/reagent-project/reagent"}) @@ -31,11 +32,12 @@ [:li [link {:href news/url} "News"]] [:li>a github "GitHub"] [:li [:a {:href "http://reagent-project.github.io/docs/master/"} "API"]]] - [:div @tests/test-results] + [:div @tests/test-results-component] [tools/main-content] [github-badge]]) (defn init! [] + (doo/set-exit-point! (fn [success?] nil)) (tests/init!) (tools/start! {:body [#'demo] :title-prefix "Reagent: " diff --git a/test/reagenttest/runtests.cljs b/test/reagenttest/runtests.cljs index a686192..6760197 100644 --- a/test/reagenttest/runtests.cljs +++ b/test/reagenttest/runtests.cljs @@ -49,10 +49,12 @@ (:fail res) " failures, " (:error res) " errors."]) "testing")])) +(def test-results-component (r/atom nil)) + (defn init! [] (when (some? (test/deftest empty-test)) ;; Only run with :load-tests true - (reset! test-results [#'test-output-mini]) + (reset! test-results-component [#'test-output-mini]) (run-tests))) (doo-tests 'reagenttest.testreagent