Ahh, ok. Commenting out :eval-in-leiningen, indeed solves the problem. That solves the problem. And I also now get that I don't have to point out stefon_compojure_test.js to the tool. That makes sense cheers.
Tim Washington Interruptsoftware.com <http://interruptsoftware.com> On Wed, Jan 8, 2014 at 5:28 AM, Chas Emerick <[email protected]> wrote: > You definitely should be seeing that. I determined the underlying cause ( > https://github.com/emezeske/lein-cljsbuild/issues/279), but it's not > clear whether it's a bug or not; I don't think lein-cljsbuild was ever > intended to be used in conjunction with :eval-in :leiningen. I'll need to > look at things more carefully later, but my intuition is that > lein-cljsbuild should probably just exit hard if that option is set, or > maybe it should "set" it back to :process (the default IIRC) for the > duration of its activities. The difference between the :leiningen > evaluation environment and the normal project one is huge. > > So, more generally re: cljsbuild and clojurescript.test setup: all of the > projects that use these that I'm aware of compile a single JS file from its > sources and test-sources, which is largely the only input to the test > runner (modulo configuration-oriented JS expressions and e.g. third-party > files to be loaded that can't be included in the GClosure build). I don't > understand the purpose of the _test.js file you have in git. > > Some real-life examples of lein-cljsbuild + clojurescript.test include: > > https://github.com/cemerick/pprng/blob/master/project.clj#L29 > https://github.com/cemerick/double-check/blob/master/project.clj#L39 > https://github.com/yogthos/cljs-ajax/blob/master/project.clj#L21 > https://github.com/nbardy/asteroids/blob/master/project.clj#L16 > > I hope that helps. > > Cheers, > > - Chas > > > On 01/07/2014 09:03 PM, Timothy Washington wrote: > > Right, I expected to see something like `*Running...*`. > > *stefon_**compojure_test.js* is the test file, and *stefon_* > *compojure.js* is the thing under test. How should that be set up? I > tried following the pattern of the project > file<https://github.com/cemerick/clojurescript.test/blob/master/project.clj#L12>in > clojurescript.test, but no dice. Is this what I should be doing? > > ... > > :cljsbuild {:builds [{:source-paths ["src/cljs" "test/cljs"] > :compiler {:output-dir "public/include/js" > :output-to > "public/include/js/stefon_compojure.js" > :optimizations :simple > :pretty-print true}}] > :test-commands {"unit-tests" ["phantomjs" :runner > > "window.literal_js_was_evaluated=true" > " > *public/include/js/stefon_compojure.js*" > " > *public/include/js/stefon_compojure_test.js*"]}} > > > > Tim Washington > Interruptsoftware.com <http://interruptsoftware.com> > > > On Tue, Jan 7, 2014 at 8:44 AM, Chas Emerick <[email protected]> wrote: > >> You're compiling to stefon_compojure.js, but your test command loads >> stefon_compojure_test.js, which looks to be the output of the compiler w/ >> :optimizations :none (which wouldn't work, anyway). >> >> That said, you should still see something like "Running ClojureScript >> test: unit-tests"... >> >> - Chas >> >> >> On 01/06/2014 08:03 PM, Timothy Washington wrote: >> >> Hey, thanks for following up. That's just it, there's no error message >> at all. After a clean, I'll run the below command, and get the resulting >> output. You can see the project >> here<https://github.com/stefonweblog/stefon-compojure>(requires >> stefon <https://github.com/stefonweblog/stefon>). >> >> $ *lein cljsbuild test* >> Compiling ClojureScript. >> Compiling "public/include/js/stefon_compojure.js" from ["src/cljs" >> "test/cljs"]... >> WARNING: Use of undeclared Var stefon-compojure-test/deftest at line 5 >> test/cljs/stefon_compojure_test.cljs >> WARNING: Use of undeclared Var stefon-compojure-test/somewhat-less-wat >> at line 5 test/cljs/stefon_compojure_test.cljs >> WARNING: Use of undeclared Var stefon-compojure-test/is at line 6 >> test/cljs/stefon_compojure_test.cljs >> WARNING: cljs.core/+, all arguments must be numbers, got >> [cljs.core/IMap cljs.core/IVector] instead. at line 6 >> test/cljs/stefon_compojure_test.cljs >> WARNING: Use of undeclared Var stefon-compojure-test/deftest at line 8 >> test/cljs/stefon_compojure_test.cljs >> WARNING: Use of undeclared Var >> stefon-compojure-test/javascript-allows-div0 at line 8 >> test/cljs/stefon_compojure_test.cljs >> WARNING: Use of undeclared Var stefon-compojure-test/is at line 9 >> test/cljs/stefon_compojure_test.cljs >> WARNING: Use of undeclared Var stefon-compojure-test/deftest at line 11 >> test/cljs/stefon_compojure_test.cljs >> WARNING: Use of undeclared Var stefon-compojure-test/service at line >> 11 test/cljs/stefon_compojure_test.cljs >> WARNING: Use of undeclared Var stefon-compojure-test/is at line 12 >> test/cljs/stefon_compojure_test.cljs >> WARNING: Use of undeclared Var stefon-compojure-test/deftest at line 14 >> test/cljs/stefon_compojure_test.cljs >> WARNING: Use of undeclared Var stefon-compojure-test/thing at line 14 >> test/cljs/stefon_compojure_test.cljs >> WARNING: Use of undeclared Var stefon-compojure-test/is at line 15 >> test/cljs/stefon_compojure_test.cljs >> Successfully compiled "public/include/js/stefon_compojure.js" in >> 14.111848268 seconds. >> >> >> >> Tim Washington >> Interruptsoftware.com <http://interruptsoftware.com> >> >> >> >> On Mon, Jan 6, 2014 at 8:20 AM, Chas Emerick <[email protected]> wrote: >> >>> Is there an error message of any kind? Does the >>> stefon_compojure_test.js file contain deftest forms, etc? >>> >>> - Chas >>> >>> >>> On 01/05/2014 04:25 PM, Timothy Washington wrote: >>> >>> Just a basic question to get me going with >>> clojurescript.test<https://github.com/cemerick/clojurescript.test>and >>> lein-cljsbuild <https://github.com/emezeske/lein-cljsbuild>. My >>> clojurescript source and tests are compiling. But the tests are not >>> running, using the *lein cljsbuild test* command. >>> >>> I've probably just been looking at this too long. Which switch should >>> I flip? >>> >>> >>> *project.clj* >>> ... >>> :cljsbuild {:builds [{:source-paths ["src/cljs" "test/cljs"] >>> :compiler {:output-dir >>> "public/include/js" >>> :output-to >>> "public/include/js/stefon_compojure.js" >>> :optimizations :simple >>> >>> :pretty-print true}}] >>> >>> :test-commands {"unit-tests" ["phantomjs" :runner >>> >>> >>> "window.literal_js_was_evaluated=true" >>> >>> "public/include/js/stefon_compojure_test.js"]}} >>> ... >>> >>> >>> *directory structure * >>> >>> $ tree {src,test,public} >>> src >>> └── cljs >>> └── stefon_compojure.cljs >>> test >>> └── cljs >>> └── stefon_compojure_test.cljs >>> public >>> ├── include >>> │ └── js >>> │ ├── cemerick >>> │ │ └── cljs >>> │ │ ├── test.cljs >>> │ │ └── test.js >>> │ ├── cljs >>> │ │ ├── core.cljs >>> │ │ └── core.js >>> │ ├── clojure >>> │ │ ├── string.cljs >>> │ │ └── string.js >>> │ ├── stefon_compojure.js >>> │ └── stefon_compojure_test.js >>> >>> >>> >>> Thanks >>> >>> Tim Washington >>> Interruptsoftware.com <http://interruptsoftware.com> >>> >>> >> -- >> 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. >> > > -- > 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. > -- 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.
