-
Notifications
You must be signed in to change notification settings - Fork 790
Testing
David Nolen edited this page May 21, 2015
·
34 revisions
ClojureScript now ships with a port of clojure.test
in the form of cljs.test
. It attempts to preserve most of the functionality provided by clojure.test
along with enhancements for asynchronous testing in a single threaded environment.
Most of the functionality is provided via macros as cljs.test
relies on compiler reflection and static vars to provide most of its functionality.
For example your ns form will probably look something like the following.
(ns my-project.tests
(:require [cljs.test :refer-macros [deftest is testing run-tests]]))
You can write a test with deftest
:
(deftest test-numbers
(is (= 1 1))
- Rationale
- Quick Start
- Differences from Clojure
- [Usage of Google Closure](Google Closure)