Skip to content

Commit

Permalink
Merge pull request #327 from leo-ppp/patch-1
Browse files Browse the repository at this point in the history
Correct documentation of `wrap-run` hooks
  • Loading branch information
alysbrooks authored Nov 3, 2022
2 parents 935e6ec + a9c4778 commit 5a64319
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/10_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ Most of Kaocha's hooks have `pre-` and `post-` variants, but we don't have
per-test level, in this case you can use `wrap-run` to "wrap" Kaocha's run
function.

In particular this wraps `kaocha.testable/-run`, so it receives a two argument function (the arguments are testable and test-plan), and should return such a function. `wrap-run` also receives the test-plan directly.
In particular this wraps `kaocha.testable/-run`, so it receives a two argument function `run` (the arguments are testable and test-plan), and should return such a function.

``` clojure
(defn my-wrap-run-hook [run _test-plan]
(defn my-wrap-run-hook [run]
(fn [testable test-plan]
(println "about to run" (:kaocha.testable/id testable))
(run testable test-plan)))
Expand Down

0 comments on commit 5a64319

Please sign in to comment.