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

execute-effect!cljs

(execute-effect! env eff)

Executed the given effect in the given test environment.

Executed the given effect in the given test environment.
sourceraw docstring

get-componentcljs

source

inject-action!cljs

(inject-action! comp action)
source

inject-return!cljs

(inject-return! comp ret)
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

subscribe-effect?cljs

(subscribe-effect? eff subs)

Tests if the given effect, is one that is emitted by a subscription equal to the given one on mount. This can be useful in unit tests.

Tests if the given effect, is one that is emitted by a subscription
equal to the given one on mount. This can be useful in unit tests.
sourceraw docstring

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

unsubscribe-effect?cljs

(unsubscribe-effect? eff subs)

Tests if the given effect, is one that is emitted by a subscription equal to the given one, on unmount. This can be useful in unit tests.

Tests if the given effect, is one that is emitted by a subscription
equal to the given one, on unmount. This can be useful in unit
tests.
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