diff --git a/.gitignore b/.gitignore index dc34730..caeb152 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ /*-init.clj /resources/public/js .nrepl-port +.lein-failures out diff --git a/project.clj b/project.clj index bbf2e1a..16731eb 100644 --- a/project.clj +++ b/project.clj @@ -14,6 +14,7 @@ :jvm-opts ["--add-modules" "java.xml.bind"] :plugins [[lein-cljsbuild "1.1.5"] + [lein-doo "0.1.8"] [lein-figwheel "0.5.13"]] :hooks [leiningen.cljsbuild] @@ -33,7 +34,13 @@ :prod {:cljsbuild {:builds {:client {:compiler {:optimizations :advanced :elide-asserts true - :pretty-print false}}}}}} + :pretty-print false}}}}} + :test {:cljsbuild + {:builds {:client {:source-paths ["src/conduit" "test"] + :compiler {:optimizations :none + :main test.runner + :output-to "resources/public/test" + :output-dir "resources/public/test/out"}}}}}} :figwheel {:server-port 3449 :repl true} diff --git a/resources/public/test.js b/resources/public/test.js new file mode 100644 index 0000000..1544d12 --- /dev/null +++ b/resources/public/test.js @@ -0,0 +1,9 @@ +var CLOSURE_UNCOMPILED_DEFINES = {}; +var CLOSURE_NO_DEPS = true; +if(typeof goog == "undefined") document.write(''); +document.write(''); +document.write(''); +document.write(''); +document.write(''); +document.write(''); +document.write(''); diff --git a/test/core_test.cljs b/test/core_test.cljs new file mode 100644 index 0000000..a319582 --- /dev/null +++ b/test/core_test.cljs @@ -0,0 +1,9 @@ +(ns test.core-test + (:require [cljs.test :refer-macros [deftest testing is]] + [test.core :as core])) + +;; Working on it ... +;; +(deftest one-is-one + (testing "if one equals one" + (is (= 1 1)))) diff --git a/test/runner.cljs b/test/runner.cljs new file mode 100644 index 0000000..a9773ff --- /dev/null +++ b/test/runner.cljs @@ -0,0 +1,5 @@ +(ns test.runner + (:require [doo.runner :refer-macros [doo-tests]] + [test.core-test])) + +(doo-tests 'test.core-test)