(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.
(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.
(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.
(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.
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close