mirror of https://github.com/status-im/reagent.git
Use cljs.test
This commit is contained in:
parent
d57fbc8fd6
commit
dfd3e540f3
|
@ -20,8 +20,7 @@
|
|||
"examples/simple/src"
|
||||
"examples/geometry/src"]}}}}
|
||||
|
||||
:test {:dependencies [[com.cemerick/clojurescript.test "0.3.1"]]
|
||||
:cljsbuild {:builds
|
||||
:test {:cljsbuild {:builds
|
||||
{:client {:source-paths ["test"]}}}}
|
||||
|
||||
:dev-base {:dependencies
|
||||
|
|
|
@ -5,11 +5,18 @@
|
|||
[testinterop]
|
||||
[testratom]
|
||||
[testwrap]
|
||||
[cemerick.cljs.test :as t]
|
||||
[cljs.test :as test :include-macros true]
|
||||
[reagent.core :as reagent :refer [atom]]
|
||||
[reagent.interop :refer-macros [.' .!]]
|
||||
[reagent.debug :refer-macros [dbg println]]))
|
||||
|
||||
(defn all-tests []
|
||||
(test/run-tests 'testreagent
|
||||
'testcursor
|
||||
'testinterop
|
||||
'testratom
|
||||
'testwrap))
|
||||
|
||||
(enable-console-print!)
|
||||
|
||||
(def test-results (atom nil))
|
||||
|
@ -41,7 +48,7 @@
|
|||
(defn ^:export run-all-tests []
|
||||
(println "-----------------------------------------")
|
||||
(try
|
||||
(reset! test-results (t/run-all-tests))
|
||||
(reset! test-results (all-tests))
|
||||
(catch js/Object e
|
||||
(do
|
||||
(println "Testrun failed\n" e "\n" (.-stack e))
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
(ns testcursor
|
||||
(:require-macros [cemerick.cljs.test
|
||||
:refer (is deftest with-test run-tests testing)]
|
||||
[reagent.ratom :refer [run! reaction]]
|
||||
[reagent.debug :refer [dbg]])
|
||||
(:require [cemerick.cljs.test :as t]
|
||||
[reagent.ratom :as rv]
|
||||
(:require [cljs.test :as t :refer-macros [is deftest testing]]
|
||||
[reagent.ratom :as rv :refer-macros [run! reaction]]
|
||||
[reagent.debug :refer-macros [dbg]]
|
||||
[reagent.core :as r]))
|
||||
|
||||
;; this repeats all the atom tests but using cursors instead
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(ns testinterop
|
||||
(:require [cemerick.cljs.test :as t :refer-macros [is deftest]]
|
||||
(:require [cljs.test :as t :refer-macros [is deftest]]
|
||||
[reagent.debug :refer-macros [dbg]]
|
||||
[reagent.interop :refer-macros [.' .! fvar fvar?]]))
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
(ns testratom
|
||||
(:require-macros [cemerick.cljs.test
|
||||
:refer (is deftest with-test run-tests testing)]
|
||||
[reagent.ratom :refer [run! reaction]]
|
||||
[reagent.debug :refer [dbg]])
|
||||
(:require [cemerick.cljs.test :as t]
|
||||
[reagent.ratom :as rv]))
|
||||
(:require [cljs.test :as t :refer-macros [is deftest testing]]
|
||||
[reagent.ratom :as rv :refer-macros [run! reaction]]
|
||||
[reagent.debug :refer-macros [dbg]]
|
||||
[reagent.core :as r]))
|
||||
|
||||
(defn running []
|
||||
(set! rv/debug true)
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
(ns testreagent
|
||||
(:require-macros [cemerick.cljs.test
|
||||
:refer (is deftest with-test run-tests testing)]
|
||||
[reagent.ratom :refer [reaction]]
|
||||
[reagent.debug :refer [dbg println log]])
|
||||
(:require [cemerick.cljs.test :as t]
|
||||
[reagent.core :as reagent :refer [atom]]
|
||||
[reagent.ratom :as rv]))
|
||||
(:require [cljs.test :as t :refer-macros [is deftest testing]]
|
||||
[reagent.ratom :as rv :refer-macros [reaction]]
|
||||
[reagent.debug :refer-macros [dbg println log]]
|
||||
[reagent.core :as reagent :refer [atom]]))
|
||||
|
||||
(defn running [] (rv/running))
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(ns testwrap
|
||||
(:require [cemerick.cljs.test :as t :refer-macros [is deftest]]
|
||||
(:require [cljs.test :as t :refer-macros [is deftest]]
|
||||
[reagent.debug :refer-macros [dbg println log]]
|
||||
[reagent.core :as r :refer [atom wrap]]))
|
||||
|
||||
|
|
Loading…
Reference in New Issue