(async tm cb)
Adds an event to the event queue with the specified time and callback function. Must be wrapped by with-timeline.
Adds an event to the event queue with the specified time and callback function. Must be wrapped by with-timeline.
(behavior & args)
Adds a new string to the list of testing contexts. May be nested, but must occur inside a specification. If the behavior is not machine testable then include the keyword :manual-test just after the behavior name instead of code.
(behavior "blows up when the moon is full" :manual-test)
Adds a new string to the list of testing contexts. May be nested, but must occur inside a specification. If the behavior is not machine testable then include the keyword :manual-test just after the behavior name instead of code. (behavior "blows up when the moon is full" :manual-test)
(component & args)
An alias for behavior. Makes some specification code easier to read where a given specification is describing subcomponents of a whole.
An alias for behavior. Makes some specification code easier to read where a given specification is describing subcomponents of a whole.
(generated-stub f)
Returns a function that can behave just like f
(which must be a symbol), but that will simply verify
arguments according to its :args
spec and then return a value that conforms to that function's :ret
spec.
Returns a function that can behave just like `f` (which must be a symbol), but that will simply verify arguments according to its `:args` spec and then return a value that conforms to that function's `:ret` spec.
(provided string & forms)
A macro for using a Midje-style provided clause within any testing framework.
This macro rewrites assertion-style mocking statements into code that can do that mocking.
See the clojure.spec for ::p/mocks
.
See the doc string for p/parse-arrow-count
.
A macro for using a Midje-style provided clause within any testing framework. This macro rewrites assertion-style mocking statements into code that can do that mocking. See the clojure.spec for `::p/mocks`. See the doc string for `p/parse-arrow-count`.
(provided! description & forms)
Just like provided
, but forces mocked functions to conform to the spec of the original function (if available).
Just like `provided`, but forces mocked functions to conform to the spec of the original function (if available).
(set-hooks! handlers)
Call this to set the :on-enter
and :on-leave
hooks.
Currently only specification
, behavior
, and component
call these hooks.
:on-enter
and :on-leave
will be called with a single argument,
a map with the test or behavior string and its location (currently just line number).
See the macro source code for exact and up to date details.
Call this to set the `:on-enter` and `:on-leave` hooks. Currently only `specification`, `behavior`, and `component` call these hooks. `:on-enter` and `:on-leave` will be called with a single argument, a map with the test or behavior string and its location (currently just line number). See the macro source code for exact and up to date details.
(specification & args)
Defines a specification which is translated into a what a deftest macro produces with report hooks for the description. Technically outputs a deftest with additional output reporting. When load-tests is false, the specification is ignored.
Defines a specification which is translated into a what a deftest macro produces with report hooks for the description. Technically outputs a deftest with additional output reporting. When *load-tests* is false, the specification is ignored.
(tick tm)
Advances the timer by the specified number of ticks. Must be wrapped by with-timeline.
Advances the timer by the specified number of ticks. Must be wrapped by with-timeline.
(when-mocking & forms)
A macro that works just like 'provided', but requires no string and outputs no extra text in the test output.
See the clojure.spec for ::p/mocks
.
See the doc string for p/parse-arrow-count
.
A macro that works just like 'provided', but requires no string and outputs no extra text in the test output. See the clojure.spec for `::p/mocks`. See the doc string for `p/parse-arrow-count`.
(when-mocking! & forms)
Just like when-mocking, but forces mocked functions to conform to the spec of the original function (if available).
Just like when-mocking, but forces mocked functions to conform to the spec of the original function (if available).
(with-timeline & forms)
Adds the infrastructure required for doing timeline testing
Adds the infrastructure required for doing timeline testing
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close