cemerick / clojurescript.test

A maximal port of `clojure.test` to ClojureScript. DEPRECATED
165 stars 32 forks source link

Test fails with ecmastript5-strict compiler option #98

Closed artemyarulin closed 9 years ago

artemyarulin commented 9 years ago

Hi,

I just found out that my test fails using the following clousure compiling options:

:compiler {
            :optimizations :advanced
            :language-in :ecmascript5-strict
            :language-out :ecmascript5-strict
            :output-to "target/app.js"}}

Here the command output:

Compiling ClojureScript.
Running ClojureScript test: unit
TypeError: 'undefined' is not a valid argument for 'in' (evaluating 'c[0] in d')

  file:///var/folders/8f/fz0x0bx553sdvqq8n398xkcw0000gn/T/runner8191833059560138797.js.html:50 in ha
  file:///var/folders/8f/fz0x0bx553sdvqq8n398xkcw0000gn/T/runner8191833059560138797.js.html:9669
  file:///var/folders/8f/fz0x0bx553sdvqq8n398xkcw0000gn/T/runner8191833059560138797.js.html:10349
ReferenceError: Can't find variable: cemerick

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.

Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/folders/8f/fz0x0bx553sdvqq8n398xkcw0000gn/T/runner8191833059560138797.js. Domains, protocols and ports must match.

Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/folders/8f/fz0x0bx553sdvqq8n398xkcw0000gn/T/runner8191833059560138797.js. Domains, protocols and ports must match.

Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file:///var/folders/8f/fz0x0bx553sdvqq8n398xkcw0000gn/T/runner8191833059560138797.js. Domains, protocols and ports must match.

Subprocess failed

Test works just fine if I use default ecmascript3 or ecmascript5, so only ecmascript5-strict with advanced optimizations causes such error. I made a diff from ecmascript5 and ecmascript5-strict result file and indeed one block is missing, which I guess is used by test framework

Just for reference, my project config:

:dependencies [[org.clojure/clojure "1.6.0"]
                 [org.clojure/clojurescript "0.0-3126"]
                 [org.clojure/core.match "0.3.0-alpha4"]
                 [org.clojure/core.incubator "0.1.3"]]

  :plugins [[lein-cljsbuild "1.0.5"]
            [com.cemerick/clojurescript.test "0.3.3"]]
 :test-commands {
      "unit" ["phantomjs" :runner "target/app.js"]}})
cemerick commented 9 years ago

Sorry for the troubles, but I've deprecated this project. Please see the notice at the top of the repo's README. This is a good thing, fundamentally. :-)