Example of how to test clojurescript code using the karma test framework.
Clone this project and compile using cljsbuild:
> git clone https://github.com/purnam/example.purnam.test.git
> cd example.purnam.test
> lein cljsbuild auto
In a new window in the same directory:
> karma start
Tests are defined in the test/example/
directory.
To generate a API Document from your tests, run the following in your project root:
> mkdir doc
> lein midje-doc
A html file will be created at /doc/index.html
. This is generated directly from the unit test file at /test/example/test_sweet_doc.cljs
. The generated output can be seen here.
There is a quick video showing how to get the testing framework set up and a typical workflow:
Copyright © 2014 Chris Zheng
Distributed under the The MIT License.