Liking cljdoc? Tell your friends :D

state-flow.assertions.matcher-combinators


match?cljmacro

(match? expected actual & [{:keys [times-to-try sleep-time] :as params}])

Builds a state-flow step which uses matcher-combinators to make an assertion.

expected can be a literal value or a matcher-combinators matcher actual can be a literal value, a primitive step, or a flow params are optional keyword-style args, supporting:

:times-to-try optional, default 1 :sleep-time optional, millis to wait between tries, default 200

Given (= times-to-try 1), match? will evaluate actual just once.

Given (> times-to-try 1), match? will use state-flow-probe/probe to retry up to :times-to-try times, waiting :sleep-time between each try, and stopping when actual produces a value that matches expected.

NOTE: when (> times-to-try 1), actual must be a step or a flow.

Returns a map (in the left value) with information about the success or failure of the match, the details of which are used internally by state-flow and subject to change.

Builds a state-flow step which uses matcher-combinators to make an
assertion.

`expected` can be a literal value or a matcher-combinators matcher
`actual` can be a literal value, a primitive step, or a flow
`params` are optional keyword-style args, supporting:

  :times-to-try optional, default 1
  :sleep-time   optional, millis to wait between tries, default 200

Given (= times-to-try 1), match? will evaluate `actual` just once.

Given (> times-to-try 1), match? will use `state-flow-probe/probe` to
retry up to :times-to-try times, waiting :sleep-time between each try,
and stopping when `actual` produces a value that matches `expected`.

NOTE: when (> times-to-try 1), `actual` must be a step or a flow.

Returns a map (in the left value) with information about the success
or failure of the match, the details of which are used internally by
state-flow and subject to change.
sourceraw docstring

report->actualclj

(report->actual report)

Returns the actual value from the report returned by match?.

Returns the actual value from the report returned by `match?`.
sourceraw docstring

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

× close