On Jan 21, 2014, at 21:07, Michael Glaesemann wrote:

> 
> On Jan 21, 2014, at 15:20, Chas Emerick wrote:
> 
>> Correct, clojurescript.test only supports phantomjs and phantomjs-compatible 
>> environments (e.g. slimer and derivatives) at the moment.  As noted in the 
>> README, runners for other environments (including node.js) are very welcome!
> 
> Nikita, Chas,
> 
> Thanks for the feedback. I understood that there's only a phantomjs runner, 
> but I guess I didn't fathom the full implications. I'll see what I can do 
> with a nodejs runner.

I've got a basic nodejs runner working:

https://github.com/grzm/clojurescript.test/commit/7622545b114b50f55c707b58623f5ed84699e105

It only works with :advanced compilation. Using :simple and :whitespace gives 
this error:

[TypeError: Cannot set property 'Unicode' of undefined]

Looks similar to the error reported here: 
http://dev.clojure.org/jira/browse/CLJS-101

That said, here's the relevant sections of my project.clj:

  :cljsbuild {:builds
              {:test {:source-paths ["src/cljs" "test"]
                      :compiler {:output-to "target/test.js"
                                 :optimizations :advanced
                                 :pretty-print true}}}
              :test-commands {"unit-tests" ["node" "resources/nodejs_runner.js"
                                            "target/test.js"]}}

Note in this case I have nodejs_runner.js in resources, not in the 
clojurescript.test tree.
I'd be happy to work this up into a proper pull request. What additional work 
would you like me to do?

Thanks!

Michael Glaesemann
grzm seespotcode net



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