Liking cljdoc? Tell your friends :D
Clojure only.

state-flow.assertions.matcher-combinators


match?cljmacro

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

Builds a state-flow assertion using matcher-combinators.

  • expected can be a literal value or a matcher-combinators matcher
  • actual can be a literal value, a primitive step, or a flow
  • params is an optional map 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.

See state-flow.probe/probe for more info

Builds a state-flow assertion using matcher-combinators.

- expected can be a literal value or a matcher-combinators matcher
- actual can be a literal value, a primitive step, or a flow
- params is an optional map 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`.

See `state-flow.probe/probe` for more info
sourceraw docstring

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

× close