EXPERIMENTAL. COULD BE CHANGED AT ANY TIME. Please share usage reports at https://github.com/noahtheduke/lazytest/issues.
An adaption of the Midje framework. Only adapts the fact
and facts
macros. fact
acts like lazytest.core/it
for the purposes of test-cases.
Unlike Midje, facts
is not an alias for fact
, and fact
not support the (given => expected)
syntax as that's highly complex and outside the scope of this namespace.
prep-ns-suite!
must be called before facts
, as they expect :lazytest/ns-suite
to point to an existing suite.
Example:
(ns noahtheduke.example-test
(:require
[lazytest.experimental.interfaces.midje :refer [prep-ns-suite! facts fact]]))
(prep-ns-suite!)
(facts "a simple top level test"
(fact "a test case"
(expect true "expect works inside"))
(facts "a nested facts call"
(fact "this still works"
(expect true))))
EXPERIMENTAL. COULD BE CHANGED AT ANY TIME. Please share usage reports at <https://github.com/noahtheduke/lazytest/issues>. An adaption of the [Midje](https://github.com/marick/midje) framework. Only adapts the [[fact]] and [[facts]] macros. [[fact]] acts like [[lazytest.core/it]] for the purposes of test-cases. Unlike Midje, [[facts]] is not an alias for [[fact]], and [[fact]] not support the `(given => expected)` syntax as that's highly complex and outside the scope of this namespace. [[prep-ns-suite!]] must be called before [[facts]], as they expect `:lazytest/ns-suite` to point to an existing suite. Example: ```clojure (ns noahtheduke.example-test (:require [lazytest.experimental.interfaces.midje :refer [prep-ns-suite! facts fact]])) (prep-ns-suite!) (facts "a simple top level test" (fact "a test case" (expect true "expect works inside")) (facts "a nested facts call" (fact "this still works" (expect true)))) ```
(prep-ns-suite!)
Set the ns :lazytest/ns-suite to a fresh suite.
Set the *ns* :lazytest/ns-suite to a fresh suite.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close