funcool/cljs-testrunners

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

cljs-testrunners

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.

Quick Start

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.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.