Hello,
I am trying to run tests with cljsbuild + clojurescript.test, following 
instructions from here (https://github.com/cemerick/clojurescript.test) and 
here (https://github.com/emezeske/lein-cljsbuild/blob/1.0.3/doc/TESTING.md). 

Here is my project.clj:

(defproject barge-ui "0.1.0-SNAPSHOT"
  :description "A minimal interface to barge REST API for demo purpose"
  :url "http://github.com/mgodave/barge";

  :jvm-opts ^:replace ["-Xmx1g" "-server"]

  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/clojurescript "0.0-2173"]
                 [org.clojure/core.async "0.1.267.0-0d7780-alpha"]
                 [org.clojure/tools.nrepl "0.2.3"]
                 [om "0.6.4"]]

  :plugins [[lein-cljsbuild "1.0.2"]
            [com.cemerick/clojurescript.test "0.3.1"]]

  ;; replace lein commands with cljsbuild commands
  :hooks [leiningen.cljsbuild]

  :cljsbuild {
              :output-dir "out"
              :test-commands {"unit" ["phantomjs" 
                                      :runner   ;; replaced with adequate 
runner from cemerick
                                      "out/app-with-test.js"]}
              :builds [{:id "dev"
                        :source-paths ["src"]
                        :compiler {
                                   :output-to "out/app.js"
                                   :pretty-print true
                                   :optimizations :none
                                   :source-map true}}
                       {:id "tests"
                        :source-paths ["src" "test"]
                        :compiler {
                                   :output-to "out/app-with-test.js"
                                   :pretty-print true
                                   :optimizations :none
                                   :source-map true}}
                       ;; {:id "release"
                       ;;  :source-paths ["src"]
                       ;;  :compiler {
                       ;;             :output-to "app.js"
                       ;;             :optimizations :advanced
                       ;;             :elide-asserts true
                       ;;             :pretty-print false
                       ;;             :output-wrapper false
                       ;;             :preamble ["js/react.min.js"]}}
                       ]
              }
  )


When I do lein test I got the following:

$ lein test 
Compiling ClojureScript.

lein test user

Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
Running ClojureScript test: unit
ReferenceError: Can't find variable: goog

  out/app-with-test.js:1

ERROR: cemerick.cljs.test was not required.

You can resolve this issue by ensuring [cemerick.cljs.test] appears
in the :require clause of your test suite namespaces.
Also make sure that your build has actually included any test files.

Subprocess failed


My tests are exactly the same test than in clojurescript.test example, but with 
a different namesake (barge.test).

What am I doing wrong ?

Thanks
Arnaud

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