bensu / doo

doo is a library and lein plugin to run cljs.test on different js environments.
Eclipse Public License 1.0
324 stars 63 forks source link

Node js-env not fetching test namespaces? #75

Closed arichiardi closed 8 years ago

arichiardi commented 8 years ago

A bug I encountered here, and I know that in the example it works, is that it does not see my test namespaces with node environment option.

The only thing it says is:

;; ======================================================================
;; Testing with Node:

I explicitely require them:

(ns launcher.runner
  (:require [cljs.test :as test]
            [doo.runner :as doo :refer-macros [doo-tests]]
            [replumb.repl-test]))

;; Add COMPILED flag to cljs eval to turn off namespace already declared errors
(set! js/COMPILED true)

(enable-console-print!)

(doo-tests 'replumb.repl-test)
{:id "node-test"
                        :source-paths ["src/cljs" "src/node" "test/cljs" "test/doo"]
                        :compiler {:main launcher.runner
                                   :output-to "dev-resources/private/test/node/compiled/replumb-repl.js"
                                   :output-dir "dev-resources/private/test/node/compiled/out"
                                   :target :nodejs
                                   :source-map true
                                   :optimizations :none}}

...and the script with echo $? returns zero.

Have someone encountered this issue?

arichiardi commented 8 years ago

Oh holy moly, I found out that (set! js/COMPILED true), which was solving another problem for tests in browser environments, is actually wrecking havok with node.

I live this here as reference. Commenting out (set! js/COMPILED true) solves. Feel free to close it.

bensu commented 8 years ago

I love when issues close themselves :)

arichiardi commented 8 years ago

The problem is that now I have that problem I solved by having it. I need to find another solution...in any case I don't think it is a doo problem anymore..