Liking cljdoc? Tell your friends :D

greenlight.step

A step is a reusable chunk of test logic.

A _step_ is a reusable chunk of test logic.
raw docstring

*pending-cleanups*clj

source

advance!clj

(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.
sourceraw docstring

clean!cljmultimethod

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.
sourceraw docstring

componentclj

(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.
sourceraw docstring

defstepclj/smacro

(defstep step-name docstring & default-config)

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)
sourceraw docstring

lookupclj

(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.
sourceraw docstring

qualify-config-keysclj

(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.
sourceraw docstring

register-cleanup!clj

(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.
sourceraw docstring

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

× close