Skip to content

Commit

Permalink
Merge pull request yogthos#87 from SevereOverfl0w/testcljs
Browse files Browse the repository at this point in the history
Make tests cljs compatible.
  • Loading branch information
yogthos committed Dec 24, 2015
2 parents bb4439c + 3e9f302 commit 589b67b
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 135 deletions.
24 changes: 18 additions & 6 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
:all (constantly true)}
:auto-clean false

:aliases {"cleantest" ["do" "clean," "test"]
"install" ["do" "clean," "install"]
"deploy" ["do" "clean," "deploy" "clojars"]}
:aliases {"test-cljs" ["doo" "rhino" "test" "once"]
"test" ["do" "test," "test-cljs"]
"cleantest" ["do" "clean," "test"]
"install" ["do" "clean," "install"]
"deploy" ["do" "clean," "deploy" "clojars"]}

:source-paths ["src/clj" "src/cljc" "src/cljs"]
:cljsbuild
Expand All @@ -25,11 +27,21 @@
:pretty-print false}}
:dev
{:compiler {:optimizations :whitespace
:pretty-print true}}}}
:pretty-print true}}

:test
{:source-paths ["src/cljc" "src/cljs" "test"]
:compiler {:output-to "target/unit-test.js"
:output-dir "target"
:main mdtest.runner
:optimizations :whitespace}}}}
:profiles
{:dev
{:jvm-opts ["-XX:-TieredCompilation"]
:dependencies [[criterium "0.4.3" :scope "test"]
[commons-lang "2.6" :scope "test"]
[org.clojure/clojurescript "1.7.145"]]
:plugins [[lein-cljsbuild "1.0.6"]]}})
[org.clojure/clojurescript "1.7.145"]
[org.mozilla/rhino "1.7.7"]]
:plugins [[lein-cljsbuild "1.0.6"]
[lein-doo "0.1.6"]]}}
:doo {:paths {:rhino "lein run -m org.mozilla.javascript.tools.shell.Main"}})
5 changes: 5 additions & 0 deletions test/mdtest_runner.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(ns mdtest.runner
(:require [doo.runner :refer-macros [doo-tests]]
[mdtests]))

(doo-tests 'mdtests)
Loading

0 comments on commit 589b67b

Please sign in to comment.