(->feature-ast source options ns-feature)(->feature-ast source
{:keys [pre-run post-run pre-scenario-run post-scenario-run
default-scenario-state]
:as _options}
ns-feature
uri)uri names the feature in the cucumber messages - the file it was read from.
`uri` names the feature in the cucumber messages - the file it was read from.
(argument->params arg)The block argument of a pickle step - datatable or docstring - as a param vector. Cells arrive trimmed and unescaped from the parser.
The block argument of a pickle step - datatable or docstring - as a param vector. Cells arrive trimmed and unescaped from the parser.
(defglue regex params & body)Defines a step: an ordinary var carrying the step's regex as :step metadata, there is no registry. The keyword a step was written with plays no part in the definition, so defgiven / defwhen / defthen / defand are four names for this one macro. Returns the var, like every other Clojure def*.
Defines a step: an ordinary var carrying the step's regex as :step metadata, there is no registry. The keyword a step was written with plays no part in the definition, so defgiven / defwhen / defthen / defand are four names for this one macro. Returns the var, like every other Clojure def*.
(define-parameter-type! type-name regex transform)Defines a {type-name} token for the sentence matchers. Its capture is
regex's match, converted by transform: one argument per capture group of
regex, or the whole match when it has none.
(define-parameter-type! "isbn" #"\d{13}" parse-isbn) (defgiven "the book {isbn}" [state isbn] ...)
Call it before loading the glues that use the token: a sentence is compiled
when its feature is parsed, and an unknown token raises there. Defining a
type again replaces it. Returns type-name.
Defines a `{type-name}` token for the sentence matchers. Its capture is
`regex`'s match, converted by `transform`: one argument per capture group of
`regex`, or the whole match when it has none.
(define-parameter-type! "isbn" #"\d{13}" parse-isbn)
(defgiven "the book {isbn}" [state isbn] ...)
Call it before loading the glues that use the token: a sentence is compiled
when its feature is parsed, and an unknown token raises there. Defining a
type again replaces it. Returns `type-name`.(re->symbol re)Le nom du var d'un glue, tiré de sa phrase. La barre oblique de l'alternance
complète/partielle en ferait un symbole qualifié, que defn refuse.
Le nom du var d'un glue, tiré de sa phrase. La barre oblique de l'alternance `complète/partielle` en ferait un symbole qualifié, que `defn` refuse.
(run-hooks x f)(run-hooks {:keys [pre-run post-run] :as x} f ->status)Encadre f par les hooks :pre-run et :post-run de x. Le teardown est dans un finally : il doit tourner meme si un hook pre-run, la resolution d'un glue ou un report leve - c'est exactement le cas pour lequel il existe.
Un hook à un argument reçoit le nom et les tags de x ; avec ->status, qui tire :success ou :fail du retour de f, les :post-run reçoivent aussi :status - :fail si f a levé.
Encadre f par les hooks :pre-run et :post-run de x. Le teardown est dans un finally : il doit tourner meme si un hook pre-run, la resolution d'un glue ou un report leve - c'est exactement le cas pour lequel il existe. Un hook à un argument reçoit le nom et les tags de x ; avec ->status, qui tire :success ou :fail du retour de f, les :post-run reçoivent aussi :status - :fail si f a levé.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |