Liking cljdoc? Tell your friends :D

hyperfiddle.rcf


!clj/sdeprecated

Deprecated alias for tap.

Deprecated alias for `tap`.
sourceraw docstring

%clj/s

Queue behaving as a value. Assert % := _ to pop from it. Async, will time out after :timeout option, default to 1000 (ms).

Queue behaving as a value. Assert `% := _` to pop from it. Async, will time out after `:timeout` option, default to 1000 (ms).
sourceraw docstring

*generate-tests*clj

source

*poll-1*cljs

Bound by drive-tap to the test's queue poll fn (fn [n cb]); park-tap calls it with n=1.

Bound by `drive-tap` to the test's queue poll fn `(fn [n cb])`; `park-tap` calls it with n=1.
sourceraw docstring

*resume*cljs

Bound by drive-tap to a 1-arg fn re-entering the coroutine with a delivered value.

Bound by `drive-tap` to a 1-arg fn re-entering the coroutine with a delivered value.
sourceraw docstring

*tapped*cljs

Holds the value the queue delivered for the in-flight park-tap; read by unpark-tap.

Holds the value the queue delivered for the in-flight `park-tap`; read by `unpark-tap`.
sourceraw docstring

=clj/s

source

asyncclj/smacro

(async done & body)
source

binding-queueclj/s

(binding-queue)
source

deftestclj/smacro

(deftest name & body)

When load-tests is false, deftest is ignored.

When *load-tests* is false, deftest is ignored.
sourceraw docstring

do-reportclj/smacro

(do-report m)
source

doneclj/s

(done)
source

drive-tapcljs

(drive-tap poll-1 coroutine)

Run an async-% test coroutine: start it, and each time the queue yields, re-enter with that value bound, until the body completes (its tail calls RCF__done!). poll-1 is the test's (fn [n cb]) queue poll.

Run an async-% test `coroutine`: start it, and each time the queue yields, re-enter
with that value bound, until the body completes (its tail calls `RCF__done!`).
`poll-1` is the test's `(fn [n cb])` queue poll.
sourceraw docstring

enable!clj/s

(enable! & [v])
source

ENABLEDcljs

source

enabled?clj/s

(enabled?)

True when RCF currently runs tests blocks (reads the dynamic *enabled*).

True when RCF currently runs `tests` blocks (reads the dynamic `*enabled*`).
sourceraw docstring

gen-nameclj/s

(gen-name form)
source

isclj/smacro

(is form)
(is form msg)
source

make-queueclj/smacro

(make-queue & args)
source

onceclj/s

(once f)

Wrap f so it runs at most once. Fires cljs.test done exactly once at the end of the coroutine (rcf#56), guarding against a double-fire from convergent branches.

Wrap `f` so it runs at most once. Fires cljs.test `done` exactly once at the end of
the coroutine (rcf#56), guarding against a double-fire from convergent branches.
sourceraw docstring

park-tapcljs

(park-tap)

Suspend var (rcf#56): register a one-shot poll of the async queue, then suspend. The poll's callback re-enters the coroutine via *resume*.

Suspend var (rcf#56): register a one-shot poll of the async queue, then suspend.
The poll's callback re-enters the coroutine via `*resume*`.
sourceraw docstring

run-tests!clj

(run-tests! ns-sym)

Run ns-sym's rcf tests on the JVM; returns {:ns ns-sym :pass N :fail [entry …]} where entry = {:file :line :column :doc :test-var :expected :actual}.

Reloads the ns under a binding-scoped enable — the *enabled* root is never touched, so nothing leaks into other sessions or hot reloads. The reporter active at call time still prints as usual; the returned map is additive. A tests block that binds its own reporter (with-reporter) bypasses the capture and is not counted. Side effect: defs inside tests blocks remount into the ns and persist.

JVM-only: an nREPL eval compiles the :clj arms of a .cljc — a namespace's cljs tests are compiled and run by the cljs build (browser / karma), not here.

Run `ns-sym`'s rcf tests on the JVM; returns
`{:ns ns-sym :pass N :fail [entry …]}` where entry =
`{:file :line :column :doc :test-var :expected :actual}`.

Reloads the ns under a binding-scoped enable — the `*enabled*` root is never
touched, so nothing leaks into other sessions or hot reloads. The reporter
active at call time still prints as usual; the returned map is additive.
A `tests` block that binds its own reporter (`with-reporter`) bypasses the
capture and is not counted. Side effect: `def`s inside `tests` blocks
remount into the ns and persist.

JVM-only: an nREPL eval compiles the `:clj` arms of a .cljc — a namespace's
cljs tests are compiled and run by the cljs build (browser / karma), not here.
sourceraw docstring

set-timeout!clj/s

(set-timeout! ms)
source

tapclj/s

Function to push value to async queue, e.g. (tap 42). RCF redefines this var in tests context. For REPL convenience, defaults to println outside of tests context.

Function to push value to async queue, e.g. `(tap 42)`. RCF redefines this var in tests context. For REPL
convenience, defaults to println outside of tests context.
sourceraw docstring

testsclj/smacro

(tests & body)
source

TIMEOUTcljs

source

try-exprclj/smacro

(try-expr msg form)
source

unpark-tapcljs

(unpark-tap)

Resume var (rcf#56): the value the queue delivered for the matching park-tap.

Resume var (rcf#56): the value the queue delivered for the matching `park-tap`.
sourceraw docstring

withclj/smacro

(with dispose-fn & body)

Resource cleanup helper, based on missionary's dependency-free Task protocol, see https://github.com/leonoel/task

Resource cleanup helper, based on missionary's dependency-free Task protocol, see https://github.com/leonoel/task
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