Trouble with test setup after cljs update

Hello!

I have a problem with my tests when upgrading clojurescript. The last working version of cljs is 1.9.521, with 1.9.542 it fails. This is the failure:

goog.require could not find: tools.money

  phantomjs://code/test.js:26 in logToConsole_
Error: goog.require could not find: tools.money

  phantomjs://code/test.js:27 in require

tools/money.cljs is my lib I want to test, it’s located it src-cljs/tools, while the test & test runner are in test-cljs/test. The runner looks like this:

(ns test.test-runner
  (:require [test.money-test]
            [clojure.test :as t :refer [run-all-tests]]))

(enable-console-print!)

(defmethod t/report [::t/default :end-run-tests] [m]
  (when-let [exit (cond (exists? js/phantom) js/phantom.exit
                        (exists? js/process) js/process.exit)]
    (exit (+ (:fail m) (:error m)))))

(run-all-tests)

And the beginning of the test:

(ns test.money-test
  (:require [clojure.test :refer [deftest testing is are run-tests]]
            [tools.money :as money])) ; <- without this line the error goes away, but obviously the tests all fail ;)
; ...

Compiling raises no errors or warnings besides replacing cljs.core/zero? and cljs.core/neg?, and in the production code everything works fine!
Ah, finally I run the tests with phantomjs app/assets/javascripts/cljs/test.js

Here the CLJS Changelog and the Changelog of the Google Closure compiler (which was updated in that release)

Thanks, Johannes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.