helpers for mocking components
helpers for mocking components
(called-with? component-id args)
(called-with? system component-id args)
check that a component fn was called with args
check that a component fn was called with args
(called? component-id)
(called? system component-id)
check that a component fn was called at all
check that a component fn was called at all
Add MockCallsComponent to a system
Add MockCallsComponent to a system
For mocking components whose instances are a function. Records all calls to the function as a tuple of
[[:component-group-name :component-name] [arg-1 arg-2 ...]]
Set value the mock function should return under [::ds/config :return].
For mocking components whose instances are a function. Records all calls to the function as a tuple of [[:component-group-name :component-name] [arg-1 arg-2 ...]] Set value the mock function should return under [::ds/config :return]. - If this is a function, then the function will be called - If you need to return a literal function, use (constantly (fn [])) - Use something like (cycle [1 2 3]) to return different values on consecutive c alls
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close