Utilities for making it easier to write tests.
defntest
and defntest-1
are macros for simplifying writing tests for simple functions that require no extra setup, just checking expected outputs against inputs.
test-dir
creates a temp directory that is named after the current test
Utilities for making it easier to write tests. `defntest` and `defntest-1` are macros for simplifying writing tests for simple functions that require no extra setup, just checking expected outputs against inputs. `test-dir` creates a temp directory that is named after the current test
(defntest f & test-pairs)
Defines a series of tests for function f Each test-pair consists of args expected where args is a vector of arguments to f and expected is the expected return value of (apply f args)
Defines a series of tests for function f Each test-pair consists of args expected where args is a vector of arguments to f and expected is the expected return value of (apply f args)
(defntest-1 f & test-pairs)
Defines a series of tests for 1-arity function f Each test-pair consists of arg expected where arg is a single argument to f and expected is the expected return value of (apply f [arg])
Defines a series of tests for 1-arity function f Each test-pair consists of arg expected where arg is a single argument to f and expected is the expected return value of (apply f [arg])
(test-dir)
Creates an approriately named temp directory for the current test
Creates an approriately named temp directory for the current test
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close