Liking cljdoc? Tell your friends :D

scenari.v2.glue


all-gluesclj

(all-glues)

Find all glue functions (step definitions) in all loaded namespaces.

Resolving the glue of every step of every feature means scanning all the public vars of all the loaded namespaces once per step, which dominates the loading time of a large feature suite. The result is therefore memoized, and recomputed as soon as a namespace is loaded or a step is (re)defined.

Each glue carries its :expression, compiled here once, because matching a step compares it against every glue: compiling it in the matching loop instead built one Pattern per (step, glue) pair — 1.3M compilations on a suite of 3000 steps and 400 glues.

Find all glue functions (step definitions) in all loaded namespaces.

Resolving the glue of every step of every feature means scanning all the public
vars of all the loaded namespaces once per step, which dominates the loading
time of a large feature suite. The result is therefore memoized, and recomputed
as soon as a namespace is loaded or a step is (re)defined.

Each glue carries its `:expression`, compiled here once, because matching a step
compares it against every glue: compiling it in the matching loop instead built
one Pattern per (step, glue) pair — 1.3M compilations on a suite of
3000 steps and 400 glues.
sourceraw docstring

define-parameter-type!clj

(define-parameter-type! type-name regex transform)

Voir scenari.v2.core/define-parameter-type!.

Voir `scenari.v2.core/define-parameter-type!`.
sourceraw docstring

find-closest-glues-by-nsclj

(find-closest-glues-by-ns matched-glues ns-feature)

Find glues with closest namespace proximity to the feature namespace

Find glues with closest namespace proximity to the feature namespace
sourceraw docstring

find-glue-by-step-regexclj

(find-glue-by-step-regex step ns-feature)
(find-glue-by-step-regex step ns-feature glues)

Return the tuple of fn/regex as a vector that match the step-sentence

Return the tuple of fn/regex as a vector that match the step-sentence
sourceraw docstring

invalidate-glues-cache!clj

(invalidate-glues-cache!)

Invalidate the all-glues cache. Called by the step definition macros: a glue can appear in an already loaded namespace, which the namespace count alone cannot detect.

Invalidate the `all-glues` cache. Called by the step definition macros: a glue
can appear in an already loaded namespace, which the namespace count alone
cannot detect.
sourceraw docstring

ns-proximity-scoreclj

(ns-proximity-score ns-glue ns-feature)

Calculate proximity score between two namespaces based on common segments

Calculate proximity score between two namespaces based on common segments
sourceraw docstring

parameter-type-registryclj

Les types de token connus des expressions : ceux de cucumber, {number} et ceux de define-parameter-type!. Un atome, parce que cucumber refuse de redéfinir un type : le redéfinir reconstruit le registre.

Les types de token connus des expressions : ceux de cucumber, `{number}` et
ceux de `define-parameter-type!`. Un atome, parce que cucumber refuse de
redéfinir un type : le redéfinir reconstruit le registre.
sourceraw docstring

step->expressionclj

(step->expression {:keys [step ns name]})

La phrase d'un glue, compilée. Un litéral #"..." est une regex quoi qu'elle contienne : la lire comme une expression ferait d'un ([^"]*) du texte optionnel, et son \" lèverait. Elle est ancrée parce qu'un glue regex a toujours matché la phrase entière. Lève sur un token inconnu - {produit} sans ParameterType - en nommant le glue fautif, sinon l'erreur ne dit pas lequel des 400 glues chargés est en cause.

La phrase d'un glue, compilée. Un litéral `#"..."` est une regex quoi qu'elle
contienne : la lire comme une expression ferait d'un `([^"]*)` du texte
optionnel, et son `\"` lèverait. Elle est ancrée parce qu'un glue regex a
toujours matché la phrase entière. Lève sur un token inconnu - `{produit}` sans
ParameterType - en nommant le glue fautif, sinon l'erreur ne dit pas lequel des
400 glues chargés est en cause.
sourceraw docstring

step-argsclj

(step-args glue sentence)

Les valeurs que la phrase donne au glue, converties par leur token : {int} rend un entier, {string} la chaîne sans ses guillemets.

Les valeurs que la phrase donne au glue, converties par leur token : {int}
rend un entier, {string} la chaîne sans ses guillemets.
sourceraw docstring

step-match-argumentsclj

(step-match-arguments glue sentence)

Ce que le glue capture sur la phrase, à la forme StepMatchArgument des cucumber-messages : le groupe - position, valeur, sous-groupes - et le nom du token, absent pour un groupe de regex.

Ce que le glue capture sur la phrase, à la forme `StepMatchArgument` des
cucumber-messages : le groupe - position, valeur, sous-groupes - et le nom du
token, absent pour un groupe de regex.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close