Name: cljs-testrunners
Owner: funcool
Description: ClojureScript test runners facilities/helpers.
Created: 2015-02-28 12:05:40.0
Updated: 2015-12-05 19:21:51.0
Pushed: 2015-02-28 12:09:13.0
Homepage: null
Size: 120
Language: Clojure
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
ClojureScript test runners facilities/helpers.
Provides a easy way to run tests in nodejs/iojs and return proper exitcode on process is finished. This is mandatory if you want run tests in some integration tests service like travis, circleci or any other.
This package exists because clojurescript does not provides something like this out of the box. And printing results in console is not really useful.
Additionally, this package provides slightly more compact console output.
Add the cljs-testrunners
to your dependencies list:
cool/cljs-testrunners "0.1.0-SNAPSHOT"]
Create a testrunner ns on your test directory:
ile: yourappdir/test/yourapp/testrunner.cljs
yourapp.testrunner
require [cljs-testrunners.node :as node]
[yourapp.fooo-tests]
[yourapp.baar-tests]))
n main []
ode/run-tests 'yourapp.fooo-tests
'yourapp.baar-tests))
! *main-cli-fn* main)
And configure your cljsbuild with something like this:
st-commands {"test" ["node" "tests.js"]}
ilds [{:id "dev"
:source-paths ["test"]
:notify-command ["node" "tests.js"]
:compiler {:output-to "tests.js"
:output-dir "out"
:source-map true
:static-fns true
:cache-analysis false
:main yourapp.testrunner
:optimizations :none
:target :nodejs
:pretty-print true}}]}
Maybe in a future we will add other environments for run tests.