(create-iterator elements)
Returns a function that iterates over the elements and then returns identically nil
Very useful for testing
Returns a function that iterates over the elements and then returns identically nil Very useful for testing
(with-checked-counter [inc-function-name expected] & forms)
Run the code with a counter
Run the code with a counter
(with-checked-operations [update-function-name expected & ordered] & forms)
Run the code and check that a set of operations is performed, like:
(with-checked-operations [did-it [:a :b :c] :ordered] (did-it :a) (did-it :b) (did-it :c))
Run the code and check that a set of operations is performed, like: (with-checked-operations [did-it [:a :b :c] :ordered] (did-it :a) (did-it :b) (did-it :c))
(with-no-invocations functions & forms)
Ensure that none of the functions in the array are called.
Used like this:
(with-no-invocations [android/foo-function bar/baz-function function]
forms)
Returns the last form result
Ensure that none of the functions in the array are called. Used like this: (with-no-invocations [android/foo-function bar/baz-function function] forms) Returns the last form result
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close