Skip to main content

async

macrov1.7

cljs.test/async

(async [done & body])
Wraps body as a CPS function that can be returned from a test to continue asynchronously. Binds done to a function that must be invoked once and from an async context after any assertions. (deftest example-with-timeout (async done (js/setTimeout (fn [] ;; make assertions in async context... (done) ;; ...then call done ) 0)))

No examples yet. Be the first to add one!