A step is a reusable chunk of test logic.
A _step_ is a reusable chunk of test logic.
(advance! system step ctx)
Advance the test by performing the next step. Returns a tuple of the enriched step map and updated context.
Advance the test by performing the next step. Returns a tuple of the enriched step map and updated context.
Multimethod to clean up a created resource after a test finishes. Given the entire system to choose dependencies from.
Multimethod to clean up a created resource after a test finishes. Given the entire system to choose dependencies from.
(component component-key)
Look up a system component by key. component-key
should be a keyword.
Look up a system component by key. `component-key` should be a keyword.
(defstep step-name & step-decl)
Takes a default step configuration for a reusable step, and defines a constructor that allows optional overrides to the inputs and step parameters.
Usage:
(defstep create-foo "Creates a new foo" :title "Create a Foo object" :test (fn ...) :inputs {:foo/name "Test Foo"} :output :foo/id)
(create-foo) (create-foo {}) (create-foo {:foo/name "Custom Foo"}) (create-foo {:foo/name "Foo 1"} :output :foo.1/id)
Takes a default step configuration for a reusable step, and defines a constructor that allows optional overrides to the inputs and step parameters. Usage: (defstep create-foo "Creates a new foo" :title "Create a Foo object" :test (fn ...) :inputs {:foo/name "Test Foo"} :output :foo/id) (create-foo) (create-foo {}) (create-foo {:foo/name "Custom Foo"}) (create-foo {:foo/name "Foo 1"} :output :foo.1/id)
(initialize step ctx)
Resolves contextual properties of a step prior to execution.
Resolves contextual properties of a step prior to execution.
(lookup context-key)
Look up a context value in the step context. A context key can be either
a keyword, a collection of values for get-in
, or a function of the context.
Look up a context value in the step context. A context key can be either a keyword, a collection of values for `get-in`, or a function of the context.
(qualify-config-keys step-config)
Takes a map, and prefixes all unnamespaced keywords with greenlight.step.
Takes a map, and prefixes all unnamespaced keywords with greenlight.step.
(register-cleanup! resource-type parameters)
Registers a cleanup job with the *pending-cleanups*
atom, if bound.
Registers a cleanup job with the `*pending-cleanups*` atom, if bound.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close