2015-01-05 20:30 GMT+01:00 David Nolen <[email protected]>: > Definitely plans to support async and happy to take a patch. > > Basically I would like sugar that looks like this: > > (deftest foo > (async done > ...)) > > This desugars into: > > (deftest foo > (reify > IAsyncTest > (-invoke [_ done] > ...)) > > The test runners should check for satisfies? IAsyncTest do nothing if > that's the return value of the test. Invoking done will gather > reporting information and invoke the next test. There should be a new > timeout parameter which fails a long running async test and continues. >
Good idea! I like this somewhat better than ^:async metadata on tests, but it creates a source of (almost) silent user errors: (deftest foo (async done ..) (async done ..)) Should this be the user's responsibility? Should async register the IAsyncTest instance, so that cljs.test can complain if they aren't run? By the same logic, IAsyncTest instances aren't easily composable. Should there be explicit primitives for doing so (one serial, one parallel)? OTOH, if deftest with only one async child is the only "valid" idiom, should it be encouraged by a (defasynctest foo done ...) form? kind regards -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
