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

Error when running Nashorn with `:optimizations :whitespace` #190

Open nblumoe opened 5 years ago

nblumoe commented 5 years ago

Nashorn runs with :optimizations :none are prevented and show a useful error message:

Caused by: java.lang.AssertionError: Assert failed: Nashorn doesn't support :optimizations :none

When using :optimizations :whitespace the runner starts but results in the following error. The same setup with :optimizations :simple works though.

 lein doo nashorn once

;; ======================================================================
;; Testing with Nashorn:

Error while loading file: "target/tests.js"
Error: Namespace "foo.mytest" already declared.
At line 17
WARNING: doo's init function was not set or is not a function
Subprocess failed

Maybe the assert producing the first error should also catch the whitespace optimization? Or should Nashorn be able to actually run such a setup?