Example of how to do clojurescript testing with karma
Clojure JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/example
test/example
.gitignore
.travis.yml
LICENSE
README.md
karma-testing.png
karma.conf.js
project.clj

README.md

example.purnam.test

Build Status

Example of how to test clojurescript code using the karma test framework.

Usage

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.

Document Generation

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.

Tutorial

There is a quick video showing how to get the testing framework set up and a typical workflow: ScreenShot

License

Copyright © 2014 Chris Zheng

Distributed under the The MIT License.