(as-step-fn flow)
DEPRECATED with no replacement.
DEPRECATED with no replacement.
(current-description)
Returns a flow that returns the description as of the point of execution.
For internal use. Subject to change.
Returns a flow that returns the description as of the point of execution. For internal use. Subject to change.
(description-stack s)
Returns the list of descriptions in the current stack.
Example: (description-stack s) ;; => [{:description "my test" :file "my-test-file.clj" :line 42}]
Returns the list of descriptions in the current stack. Example: (description-stack s) ;; => [{:description "my test" :file "my-test-file.clj" :line 42}]
Should the flow stop after the first failing assertion?
For internal use. Subject to change.
Should the flow stop after the first failing assertion? For internal use. Subject to change.
(filter-stack-trace)
(filter-stack-trace exclusions)
Returns an error handler which, if the first element in the pair is a failure, returns the pair with the failure's stack-trace filtered, else returns the pair as/is.
exclusions (default default-stack-trace-exclusions) is a sequence of regular expressions used to match class names in stack trace frames. Matching frames are excluded.
Returns an error handler which, if the first element in the pair is a failure, returns the pair with the failure's stack-trace filtered, else returns the pair as/is. exclusions (default default-stack-trace-exclusions) is a sequence of regular expressions used to match class names in stack trace frames. Matching frames are excluded.
(flow description & flows)
Creates a flow which is a composite of flows.
Creates a flow which is a composite of flows.
(flow* {:keys [description caller-meta]} & flows)
For use in macros that create flows. Not private (appropriate for helper libraries, for example), but not intended for use directly in flows.
Creates a flow which is a composite of flows. The calling macro should
provide (meta &form) as :caller-meta
in order to support accurate line
number reporting.
For use in macros that create flows. Not private (appropriate for helper libraries, for example), but not intended for use directly in flows. Creates a flow which is a composite of flows. The calling macro should provide (meta &form) as `:caller-meta` in order to support accurate line number reporting.
(ignore-error pair)
No-op error handler that ignores the error.
No-op error handler that ignores the error.
(log-and-throw-error! pair)
DEPRECATED: Use (comp throw-error! log-error) instead.
DEPRECATED: Use (comp throw-error! log-error) instead.
(log-error pair)
Error handler that logs error and returns pair.
Error handler that logs error and returns pair.
(modify-meta f & args)
Returns a monad that will apply vary-meta to the world.
For internal use. Subject to change.
Returns a monad that will apply vary-meta to the world. For internal use. Subject to change.
(pop-meta)
Returns a flow that will modify the state metadata.
For internal use. Subject to change.
Returns a flow that will modify the state metadata. For internal use. Subject to change.
(push-meta description {:keys [line ns file call-site-meta]})
Returns a flow that will modify the state metadata.
For internal use. Subject to change.
Returns a flow that will modify the state metadata. For internal use. Subject to change.
(run flow)
(run flow initial-state)
Given an initial-state (default {}), runs a flow and returns a tuple of the result of the last step in the flow and the end state.
Given an initial-state (default {}), runs a flow and returns a tuple of the result of the last step in the flow and the end state.
(run! flow)
(run! flow initial-state)
DEPRECATED. Use run*
DEPRECATED. Use `run*`
(run* {:keys [init cleanup runner on-error fail-fast? before-flow-hook]
:or {init (constantly {})
cleanup identity
runner run
fail-fast? false
before-flow-hook identity
on-error (comp throw-error!
log-error
(filter-stack-trace
default-stack-trace-exclusions))}}
flow)
Runs a flow with specified parameters. Use run
unless you need
the customizations run*
supports.
Supported keys in the first argument are:
:fail-fast?
optional, default false
, when set to true
, the flow stops running after the first failing assertion
:init
optional, default (constantly {}), function of no arguments that returns the initial state
:cleanup
optional, default identity
, function of the final state used to perform cleanup, if necessary
:runner
optional, default run
, function of a flow and an initial state which will execute the flow
:before-flow-hook
optional, default identity
, function from state to new-state that is applied before excuting a flow, after flow description is updated.
:on-error
optional, function of the final result pair to be invoked when the first value in the pair represents an error, default:
(comp throw-error! log-error (filter-stack-trace default-stack-trace-exclusions))
Runs a flow with specified parameters. Use `run` unless you need the customizations `run*` supports. Supported keys in the first argument are: `:fail-fast?` optional, default `false`, when set to `true`, the flow stops running after the first failing assertion `:init` optional, default (constantly {}), function of no arguments that returns the initial state `:cleanup` optional, default `identity`, function of the final state used to perform cleanup, if necessary `:runner` optional, default `run`, function of a flow and an initial state which will execute the flow `:before-flow-hook` optional, default `identity`, function from state to new-state that is applied before excuting a flow, after flow description is updated. `:on-error` optional, function of the final result pair to be invoked when the first value in the pair represents an error, default: `(comp throw-error! log-error (filter-stack-trace default-stack-trace-exclusions))`
(runner)
Creates a flow that returns the runner (function). Useful for helpers that need to access the runner.
Creates a flow that returns the runner (function). Useful for helpers that need to access the runner.
(throw-error! pair)
Error handler that throws the error.
Error handler that throws the error.
(top-level-description s)
Returns the description passed to the top level flow (or the stringified symbol passed to defflow).
Returns the description passed to the top level flow (or the stringified symbol passed to defflow).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close