Andrey, thank you for packaging it and sharing as a library.

Just for record, my solution for phantomjs-based test runner:

https://github.com/binaryage/cljs-devtools/blob/23a850807c7d8cb4c5030a943cbe15bd7db1ff86/test/runner.cljs#L15
https://github.com/binaryage/cljs-devtools/blob/23a850807c7d8cb4c5030a943cbe15bd7db1ff86/test/phantom.js#L24

By overriding one method via ::test/default I didn't have to provide all 
reporting methods.
Antonin

On Saturday, February 28, 2015 at 7:12:04 PM UTC+7, Andrey Antukh wrote:
> I have just created cljs-testrunners package for solve it and not repeat the 
> same code in all packages that need a return code properly set.
> 
> 
> https://github.com/funcool/cljs-testrunners
> 
> 
> 
> Maybe it can be useful to some one.
> 
> 
> Cheers.
> Andrey
> 
> 
> 2015-02-27 23:37 GMT+01:00 Andrey Antukh <[email protected]>:
> 
> Ok, will try it, thanks...
> 
> 
> But, in any case, cljs.test does not support something like thas out of the 
> box? Run tests with simply printing result in a console is not very useful :(
> 
> 
> I don't know, but I think this is the first testing library that by default 
> does not have easy way to check if all test passes or not. 
> I'm missing something?
> 
> 
> Having something like this would be awesome. Should be enough if 
> cljs.test/run-tests true if all tests passes or  false in case contrary. Or 
> something similar. 
> 
> 
> Cheers.
> Andrey
> 
> 
> 
> 
> 
> 
> 2015-02-27 21:31 GMT+01:00 David Nolen <[email protected]>:
> 
> You can supply your own reporter and instead of printing you can aggregate 
> results.
> 
> 
> David
> 
> 
> 
> 
> On Fri, Feb 27, 2015 at 3:18 PM, Andrey Antukh <[email protected]> wrote:
> 
> 
> 
> Hi!
> 
> 
> I'm not clearly understand how I can get the number of failed tests when run 
> test with cljs.test and return proper exit-code.
> 
> 
> I have previously experimented with run.js and with  :main option on cljs 
> compiler. But in all cases i found the same behavior. 
> 
> 
> I don't know a proper way for obtain a result after test are run for proper 
> set nodejs process.exitCode property...
> 
> 
> - The `run-tests` function does not returns any result.
> - Passing custom env to `run-test` has same effect.
> - I have tried set the env with binding (obviously, same effect)
> 
> 
> I have read the documentation (the docstrings) but I do not find any relevant 
> that can help me.
> 
> 
> I'm currently have tests with cljs.test (sync and async) on varios apps 
> running with nodejs and the only way to see if tests pases is viewing the 
> output to the console. Without proper returncode when tests are failing 
> travis (or any other service for tests) does not work properly.
> 
> 
> Thanks!
> 
> 
> Cheers.
> Andrey
> 
> 
> -- 
> 
> 
> 
> Andrey Antukh - Андрей Антух - <[email protected]> / <[email protected]>
> http://www.niwi.be
> 
> https://github.com/niwibe
> 
> 
> 
> 
> 
> -- 
> 
> 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.
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> 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.
> 
> 
> 
> 
> 
> -- 
> 
> 
> 
> Andrey Antukh - Андрей Антух - <[email protected]> / <[email protected]>
> http://www.niwi.be
> 
> https://github.com/niwibe
> 
> 
> 
> 
> 
> -- 
> 
> 
> 
> Andrey Antukh - Андрей Антух - <[email protected]> / <[email protected]>
> http://www.niwi.be
> 
> https://github.com/niwibe

-- 
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.

Reply via email to