The bindings
plugin allows you to configure dynamic var bindings from
tests.edn
, so they are visible during the test run.
#kaocha/v1
{:plugins [:kaocha.plugin/bindings]
:kaocha/bindings {my.foo-test/*a-var* 456}}
(ns my.foo-test
(:require [clojure.test :refer :all]))
(def ^:dynamic *a-var* 123)
(deftest var-test
(is (= 456 *a-var*)))
When I run bin/kaocha
Then the output should contain:
1 tests, 1 assertions, 0 failures.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close