Liking cljdoc? Tell your friends :D

reacl-c.test-util.core


*max-update-loops*cljs

source

envcljs

(env item & [options])

Returns a new test environment to test the behavior of the given item.

Returns a new test environment to test the behavior of the given item.
sourceraw docstring

get-componentcljs

source

inject-action!cljs

(inject-action! comp action)
source

inject-state-change!cljs

(inject-state-change! comp state)
source

invoke-callback!cljs

(invoke-callback! comp callback event)
source

mount!cljs

(mount! env state)

Mounts the item of the given test environment with the given state, and returns actions and maybe a changed state.

Mounts the item of the given test environment with the given
state, and returns actions and maybe a changed state.
sourceraw docstring

performance-checkcljs

(performance-check item state-seq)

For all the given states, this checks that for the same state, the item renders to the equal item; i.e. rendering has no side effects. If that it true, it also checks that for different states, it renders to different items; i.e. the state is minimal for this item. Note that this test makes most sense for 'dynamic' items. Returns :bad, :good, :ideal depending on these results.

For all the given states, this checks that for the same state, the
item renders to the equal item; i.e. rendering has no side
effects. If that it true, it also checks that for different states,
it renders to different items; i.e. the state is minimal for this
item. Note that this test makes most sense for 'dynamic'
items. Returns :bad, :good, :ideal depending on these results.
sourceraw docstring

providedcljmacro

(provided bindings & body)
source

send-message!cljs

(send-message! comp msg)

Sends a message to the given component or the toplevel component of the given test environment, and returns actions and maybe a changed state.

Sends a message to the given component or the toplevel component of
the given test environment, and returns actions and maybe a changed
state.
sourceraw docstring

seq-diffcljs

(seq-diff s1 s2)
source

unmount!cljs

(unmount! env)

Unmounts the item of the given test environment, and return actions and maybe a changed state.

Unmounts the item of the given test environment, and return
actions and maybe a changed state.
sourceraw docstring

update!cljs

(update! env state)

Updates the state of the item of the given test environment, and returns actions and maybe a changed state.

Updates the state of the item of the given test environment, and
returns actions and maybe a changed state.
sourceraw docstring

update!!cljs

(update!! env state)

Updates the state of the item of the given test environment, and if the state is changed in reaction to that, then keeps on updating it. Returns actions and the final changed state, if it was changed at all. Throws if there are more than max-update-loops recursions, which are a sign for bug in the item.

Updates the state of the item of the given test environment, and
if the state is changed in reaction to that, then keeps on updating
it. Returns actions and the final changed state, if it was changed
at all. Throws if there are more than *max-update-loops* recursions,
which are a sign for bug in the item.
sourceraw docstring

verify-performancecljs

(verify-performance level item state-seq)
source

verify-performance!cljs

(verify-performance! level item state-seq)
source

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

× close