Liking cljdoc? Tell your friends :D

eg


->eg-testclj/smacro

(->eg-test [test-thing & _ :as test-body] egge-spec)

Common logic between 'eg' and 'ge'.

Common logic between 'eg' and 'ge'.
sourceraw docstring

->example-testclj/smacro

(->example-test fn-sym examples focus-metas- focus?)

Creates a clojure.test test for function being tested. Assertions are generated under the test using provided examples. Test name is derived from the fully qualified name of function under test, and by appending '-test' to it. Test may not run depending on its focus state, and of other function tests.

Creates a clojure.test test for function being tested.
Assertions are generated under the test using provided examples.
Test name is derived from the fully qualified name of function under test, and by appending '-test' to it.
Test may not run depending on its focus state, and of other function tests.
sourceraw docstring

->expression-testclj/smacro

(->expression-test {:keys [expression operator expected]})

Creates a clojure.test test for expression being tested. Assertion is generated under the test using provided expression. Test name is created as 'eg-test-<rand-id>'.

Creates a clojure.test test for expression being tested.
Assertion is generated under the test using provided expression.
Test name is created as 'eg-test-<rand-id>'.
sourceraw docstring

->test-nameclj/s

source

alter-test-var-update-fnclj/s

(alter-test-var-update-fn test-v)

Meant for use with 'alter-var-root' to decorate 'clj.test/test-var' with test check on focus state.

Meant for use with 'alter-var-root' to decorate 'clj.test/test-var' with
test check on focus state.
sourceraw docstring

assoc-focus-metasclj/s

(assoc-focus-metas focus-metas- fn-meta fn-sym)

Creates a new entry in fn to focus? map for qualified function in params.

Creates a new entry in fn to focus? map for qualified function in params.
sourceraw docstring

assoc-if-newclj/s

(assoc-if-new coll k v)
source

cljs-safe-namespaceclj/s

(cljs-safe-namespace thing)

Like 'namespace', but occurrences of '.' are replaced with '-', to prevent compilation error in cljs. Used to create an unambiguous test name.

Like 'namespace', but occurrences of '.' are replaced with '-', to prevent compilation error in cljs.
Used to create an unambiguous test name.
sourceraw docstring

dont-care?clj/s

source

egclj/smacro

(eg & args)

Test function using examples of parameters / expected value. See readme for usage.

Test function using examples of parameters / expected value. See readme for usage.
sourceraw docstring

ensure-vec-wrapped-paramsclj/s

(ensure-vec-wrapped-params example)
source

exclj/smacro

(ex & body)

Test arbitrary expressions against corresponding expected values. See readme for usage.

Test arbitrary expressions against corresponding expected values.
See readme for usage.
sourceraw docstring

ffilterclj/s

(ffilter pred coll)
source

fill-dont-caresclj/s

(fill-dont-cares examples)

Takes in example pairs, and fills every occurrence of a don't care with values from other examples. Each '' don't care occurrence is replaced with a value from another example at the same args position. Each named don't care (prefixed with '$'), is replaced the same way as in '', then propagated to every occurrence under its expected value.

Takes in example pairs, and fills every occurrence of a don't care with values from other examples.
Each '_' don't care occurrence is replaced with a value from another example at the same args position.
Each named don't care (prefixed with '$'), is replaced the same way as in '_', then propagated to every occurrence under
its expected value.
sourceraw docstring

focus-metasclj/s

source

geclj/smacro

(ge & args)

Test function using examples of parameters / expected value. See readme for usage.

Test function using examples of parameters / expected value. See readme for usage.
sourceraw docstring

map-dregsclj/s

(map-dregs f & colls)

Like map but when there is a different count between colls, applies input fn to the coll values until the biggest coll is empty.

Like map but when there is a different count between colls, applies input fn
to the coll values until the biggest coll is empty.
sourceraw docstring

named-dont-care?clj/s

(named-dont-care? thing)
source

operatorsclj/s

source

prepare-assertion-expressionclj/s

(prepare-assertion-expression expr)
source

prepare-examplesclj/smultimethod

source

rm-lead-colonclj/s

(rm-lead-colon s)

Motivation: 'name' does not work for processed strings.

Motivation: 'name' does not work for processed strings.
sourceraw docstring

set-eg!clj

(set-eg! & egs)

Interns 'eg', 'ge', and 'ex' in clojure.core, to be able to use those forms without requires in test ns. Then, refreshes all namespaces for cases when a test namespace is required before this function is called.

Interns 'eg', 'ge', and 'ex' in clojure.core, to be able to use those forms without requires in test ns.
Then, refreshes all namespaces for cases when a test namespace is required before this function is called.
sourceraw docstring

set-eg-no-refresh!clj

(set-eg-no-refresh! egs)

Interns 'eg', 'ge', and 'ex' in clojure.core, to be able to use those forms without requires in test ns.

Interns 'eg', 'ge', and 'ex' in clojure.core, to be able to use those forms without requires in test ns.
sourceraw docstring

test?clj/s

(test? focus-metas focus?)

Used to determine if function will be tested based on its focus state, and the focus state of the other function tests.

Used to determine if function will be tested based on its focus state,
and the focus state of the other function tests.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close