Liking cljdoc? Tell your friends :D
ClojureScript only.

reacl-c-basics.ajax-test-util

Utilities to help emulating server responses in unit tests.

Utilities to help emulating server responses in unit tests.
raw docstring

emulate-requestscljs

(emulate-requests item f)

Returns an item that calls f on every ajax request executed in item. The function may return an ajax response, in which case the request isn't actually executed, but results in the returned response instead.

If the function returns nil, the request is executed as normal. Note that this means you can pass in a map as f, mapping requests to responses.

Returns an item that calls `f` on every ajax request executed in
`item`. The function may return an ajax response, in which case the
request isn't actually executed, but results in the returned response
instead.

If the function returns `nil`, the request is executed as
normal. Note that this means you can pass in a map as `f`, mapping
requests to responses.
sourceraw docstring

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

× close