slagyr / speclj

pronounced "speckle": a TDD/BDD framework for Clojure.
MIT License
459 stars 58 forks source link

Async function testing support? #118

Open niwinz opened 9 years ago

niwinz commented 9 years ago

Sorry if this is not the proper location for this question or maybe is a duplicated one...

Speclj has support for asynchronous code? In clojure it can be handled with blocking calls but in clojurescript is not possible. And in js environments, async tests is a very common case.

Would be awesome having that.

stephanos commented 9 years ago

I just ran into this as well. Maybe I need to move to cemerick/clojurescript.test which can handle this? :-(

niwinz commented 9 years ago

I'm also considering switching back to cljs.test or clojurescript.test. In javascript environments async tests is one of the common use cases.

stephanos commented 9 years ago

@niwibe do you know if the new cljs.test can handle this? I can't find any documentation.

niwinz commented 9 years ago

Is not implemented yet :( You can read some discussion about that in: https://groups.google.com/d/msg/clojurescript/gnCl0CySSk8/7z5yzI86t6wJ

niwinz commented 9 years ago

Any progress on this?

slagyr commented 9 years ago

I'm aware of the need for this feature and spent a good deal of time investigating today. It's not as simple as I'd hoped. It will likely require an overhaul of the way failures are captured and results are reported. And these may be breaking changes for some use cases, so it'll have to come in a new major version. Current plan is for 4.0.

slagyr commented 9 years ago

https://github.com/slagyr/speclj/issues/100 Also includes request for async.