--
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 clojurescrip...@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.
How i can test which type of buffer the channel is using? Is it possible to get the channel's buffer? And is there a way to get size of buffer?
Specifically I want to test does my constructor-function build correct channel.
Here's my current unit test: https://gist.github.com/timgluz/7718519
I used core.async's cljs test (https://github.com/clojure/core.async/blob/master/src/test/cljs/cljs/core/async/buffer_tests.cljs) as example, but this example uses plain buffers, but not channels.
No need to say, it fails for last 3 tests.
Timo
--
The big problem is that clojurescript.test uses `binding` all over the place to keep track of test failures and fiddle with test output, and because clojurescript doesn't support binding conveyance in go blocks (https://groups.google.com/forum/#!msg/clojure/xtxRVuSOLg4/2xj-UqO5NSAJ) this falls apart pretty quickly.
Does anyone know how much effort it'd be to add binding conveyance to clojurescript go blocks? Is there any existing work along these lines?
I tried to preserve same API compatibility. If async features are not used everything should work as before. With async tests some features doesn't work very well by design: fixtures, testing scopes and probably some other.
Here is pull request: https://github.com/cemerick/clojurescript.test/pull/36
I'd be happy to hear some feedback. Especially how to add async API to clojurescript.test by preserving compatibility with classic clojure.test. I couldn't think of something better than adding 2 functions for locking/unlocking test execution.
Thank you,
Nikita