slagyr / speclj

pronounced "speckle": a TDD/BDD framework for Clojure.
MIT License
458 stars 58 forks source link

PhantomJS 2.0.0: TypeError: undefined is not an object (evaluating 'phantom.args[0]') #135

Open macroexpanse opened 9 years ago

macroexpanse commented 9 years ago

I'm attempting to port some specs from clj to cljc and be able to run them on both platforms. While I am able to run them on the JVM with lein spec, I am unable to run the specs through either lein cljsbuild or the executable.

jstrength commented 9 years ago

+1

eploko commented 8 years ago

The PhantomJS API documentations says you should use the args property on the system module as the former property on the phantom module has been deprecated.

So your code now should look like:

var system = require('system');
...
p.injectJs(system.args[1]);
wind13 commented 8 years ago

I got same problem as @taeverity.

And I tried @eploko code, got another error:

ClojureScript could not load :main, did you forget to specify :asset-path?ReferenceError: Can't find variable: goog

  about:blank:1 in global code
  :0 in write
ReferenceError: Can't find variable: speclj

  undefined:2
  :6