Just not possible. Just generating and compiling the test runner on the fly is your simplest option.
On Friday, June 26, 2015, Aleksey Kladov <aleksey.kla...@gmail.com> wrote: > Hello! > > I'm using ClojureScript for nodejs and I would like to use cljs.test to > run only tests in selected namespaces, like this: "node test.js > my-test-ns". > > I'm using `run-all-tests` to launch the tests: > > ;; test_runner.cljs > > (defn -main [] > (run-all-tests #"my-namespace.*")) > > (set! *main-cli-fn* -main) > > > (set! *main-cli-fn* -main) > > > My idea was to create dynamically a regular expression for a namespace > based on command line arguments to node, but it didn't work out: > run-all-tests is a *macro*, so, when I use it with the dynamically > constructed re, I get an error > > clojure.lang.ExceptionInfo: clojure.lang.Symbol cannot be cast to > java.util.regex.Pattern > > How can I convince cljs.test to run tests only in the namespaces, > mentioned in arguments to node? > > -- > 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 clojurescript+unsubscr...@googlegroups.com <javascript:;>. > To post to this group, send email to clojurescript@googlegroups.com > <javascript:;>. > 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.