reagent-project / reagent-template

A Leiningen template for projects using Reagent.
MIT License
394 stars 55 forks source link

:cljsbuild :test-commands "unit" has keyword in it #61

Closed lvh closed 9 years ago

lvh commented 9 years ago
                   :cljsbuild {:builds {:app {:source-paths ["env/dev/cljs"]
                                              :compiler {:main "shrieker.dev"
                                                         :source-map true}}
                                        :test {:source-paths ["src/cljs"  "test/cljs"]
                                               :compiler {:output-to "target/test.js"
                                                          :optimizations :whitespace
                                                          :pretty-print true
                                                          :preamble ["react/react.js"]}}}
                               :test-commands {"unit" ["phantomjs" :runner
                                                       "test/vendor/es5-shim.js"
                                                       "test/vendor/es5-sham.js"
                                                       "test/vendor/console-polyfill.js"
                                                       "target/test.js"]}}}

... resulting in following complaint:

➜  shrieker git:(master) ✗ lein cljsbuild test unit                                                                                                                       18:44:09
Compiling ClojureScript.
Invalid :test-command, contains non-string value: [phantomjs :runner test/vendor/es5-shim.js test/vendor/es5-sham.js test/vendor/console-polyfill.js target/test.js]

I'm not sure what that key means or how this is supposed to work.

yogthos commented 9 years ago

The tests require phantomjs installed on the system.

lvh commented 9 years ago

It is:

➜  shrieker git:(master) ✗ phantomjs --version                                                                                                                            10:52:46
2.0.0
➜  shrieker git:(master) ✗ lein cljsbuild test unit                                                                                                                       10:52:48
Compiling ClojureScript.
Invalid :test-command, contains non-string value: [phantomjs :runner test/vendor/es5-shim.js test/vendor/es5-sham.js test/vendor/console-polyfill.js target/test.js]

I only installed it afterwards, though; I'll try a fresh shell & lein clean next.

lvh commented 9 years ago

No dice, but an interesting error. A new lein new reagent xyz +test did work, though, so I'll try and figure out the diff between the two.

lvh commented 9 years ago

Sorry, this was my screwup; I was trying to port this to cljs.test and forgot that :runner was a clojurescript.test-only thing.