Liking cljdoc? Tell your friends :D

knitty.testing


explain-yank-resultclj

(explain-yank-result yank-result)
source

from-nsclj

(from-ns & nss)

Build keyword predicate mathing to any namespace from nss. Namespaces may be specified as strings, symbols or regex patterns.

Build keyword predicate mathing to any namespace from `nss`.
Namespaces may be specified as strings, symbols or regex patterns.
sourceraw docstring

from-this-nscljmacro

(from-this-ns)

Build keyword predicate mathing to keywords only from *ns*.

Build keyword predicate mathing to keywords only from `*ns*`.
sourceraw docstring

mock-registryclj

(mock-registry registry yarn-key->mock-yarn)
source

with-yarnscljmacro

(with-yarns yarns & body)

Run body with additional yarns attached to the registry. This function known to be slow, intended only for testing/mocking!

Run body with additional yarns attached to the registry.
This function known to be slow, intended only for testing/mocking!
sourceraw docstring

with-yarns*clj

(with-yarns* yarns body-fn)
source

with-yarns-onlycljmacro

(with-yarns-only predicate & body)

Run body with some yarns deactivated. Predicate is called with yarn-id (namespaced keyword) for all available yarns in the registry. If predicate returns false yarn is replaced with 'fail always' stub. This function known to be slow, intended only for testing/mocking!

Disable all yarns except from current namespace:

(with-yarns-only (from-this-ns)
  @(yank {...} [...]))
Run body with some yarns deactivated.
Predicate is called with yarn-id (namespaced keyword) for all available yarns in the registry.
If predicate returns false yarn is replaced with 'fail always' stub.
This function known to be slow, intended only for testing/mocking!

Disable all yarns except from current namespace:

    (with-yarns-only (from-this-ns)
      @(yank {...} [...]))
sourceraw docstring

with-yarns-only*clj

(with-yarns-only* predicate body-fn)
source

yank-explain!clj

(yank-explain! inputs yarns)
(yank-explain! inputs yarns opts)

Run knitty.core/yank with tracing enabled, await (synchonously) result and return nn extra information for debugging and testing.

Result is dictionary with:

  • :ok? boolean, true when yank resulted with no error
  • :result yank* result or thrown exception
  • :traces list of yank traces
  • :yanked set of yanked nodes
  • :failed set of failed nodes (with an exception)
  • :called set of computed nodes
  • :leaked set of leaked nodes (started but not completed yet)
  • :depend graph of direct dependencies (adjacency list, includes unused lazy deps)
  • :depend* graph of indirect (all) dependencies
  • :use graph of direct node usages (adjacency list, does not include unused lazy deps)
  • :use* graph of indirect node usages
Run `knitty.core/yank` with tracing enabled, await (synchonously) result
and return nn extra information for debugging and testing.

Result is dictionary with:
- :ok?      boolean, true when `yank` resulted with no error
- :result   yank* result or thrown exception
- :traces   list of yank traces
- :yanked   set of yanked nodes
- :failed   set of failed nodes (with an exception)
- :called   set of computed nodes
- :leaked   set of leaked nodes (started but not completed yet)
- :depend   graph of direct dependencies (adjacency list, includes unused lazy deps)
- :depend*  graph of indirect (all) dependencies
- :use      graph of direct node usages (adjacency list, does not include unused lazy deps)
- :use*     graph of indirect node usages
sourceraw docstring

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

× close