Liking cljdoc? Tell your friends :D

Testing Your App

By default, a new project created with Chestnut will have regular Clojure and ClojureScript unit tests enabled, the latter using lein-doo to run against various JS backends.

Default ("deftest" style)

Clojure unit tests

The Clojure unit tests can be found under test/clj. They're written using the Clojure test API. There's an example (example_test.clj) ready to be modified as soon as you create the project.

Run the tests by executing

lein test

ClojureScript tests

Can be found under test/cljs. Again, there's an example, in this case called core.cljs. Find out about the syntax by reading the test framework source

These tests are set up to run using PhantomJS, so make sure you have that installed and available on your path.

Then execute

lein doo phantom test once

If you want to have auto-testing (where the tests automatically run when you make a change to an affected namespace) then use

lein doo phantom test

Can you improve this documentation? These fine people already did:
Rory Gibson & Arne Brasseur
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close