WARNING: This API is experimental and subject to changes.
WARNING: This API is experimental and subject to changes.
(with-redefs bindings flow)WARNING: with-redefs usage is not recommended. Use only if you know what you're
doing and you are sure you can't achieve the same result without it.
Wraps the provided state-flow execution with clojure.core/with-redefs
macro, e.g.
(defn now [] (java.util.Date.)) (def flow-with-trapped-time (labs.state/with-redefs [now (constantly #inst "2018-01-01")] (flow "a flow in 2018" ...)))
WARNING: `with-redefs` usage is not recommended. Use only if you know what you're
doing and you are sure you can't achieve the same result without it.
Wraps the provided state-flow execution with `clojure.core/with-redefs`
macro, e.g.
(defn now [] (java.util.Date.))
(def flow-with-trapped-time
(labs.state/with-redefs
[now (constantly #inst "2018-01-01")]
(flow "a flow in 2018"
...)))(wrap-with wrapper-fn flow)WARNING: wrap-with usage is not recommended. Use only if you know what you're
doing and you are sure you can't achieve the same result without it.
Wraps the provided state-flow execution. wrapper-fn will be passed a
function that will run the flow when called.
WARNING: `wrap-with` usage is not recommended. Use only if you know what you're doing and you are sure you can't achieve the same result without it. Wraps the provided state-flow execution. `wrapper-fn` will be passed a function that will run the flow when called.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |