-
-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Milestone
Description
clojure.test/with-test allows tests to be defined around a function definition. I've never seen anyone do this but it does work with expectations too:
(with-test
(defn foobar [x]
(* 2 x))
(expect 4 (foobar 2))
(expect even? (foobar 13)))
(foobar 1) ;=> 2
(test-vars [#'foobar]) ; runs the testsMetadata
Metadata
Assignees
Labels
No labels