speclj
speclj copied to clipboard
Could not find variable require
New to clojure and clojure script but I am using your framework for unit testing in clojurescript
i have the following in my project file
:cljsbuild {
:builds [{
:id "dev"
:source-paths ["src/cljs"]
:compiler {
:main scripts.core
:output-to "build/js/main.js"
:output-dir "build/js/out"
:optimizations :none
:source-map true
:source-map-timestamp true
:recompile-dependents false
:notify-commands ["bin/phantomjs" "bin/speclj.js" "build/js/main.js"]
}
},
{
:id "prod"
:source-paths ["src/cljs"]
:compiler {
:main scripts.core,
:output-to "build/js/main.js",
:output-dir "build/js/output"
:optimizations :simple,
:source-map "build/js/main.js.map",
:asset-path "js/out"
:pretty-print true
}
}
]
:test-commands {"test" ["bin/phantomjs" "bin/speclj.js" "build/js/main.js"]}
}
:profiles {:dev {:plugins [[lein-pdo "0.1.1"][lein-ring "0.8.10"][lein-cljsbuild "1.1.3"]]}
:test {
:test-paths ["spec/cljs"]
:source-paths ["src/cljs"]
:dependencies [
[midje "1.7.0"]
[speclj "3.3.2"]
[clj-webdriver/clj-webdriver "0.6.0"]
[com.github.detro.ghostdriver/phantomjsdriver "1.0.3"]
]
:plugins [[lein-midje "3.1.3"]]}}
and the following directory structure on a vagrant ubuntu-64 virtualbox
|-/bin |--phantomjs |--speclj.js |-/src |--/cljs |---/scripts |--core.cljs |-/spec |--/cljs |---/scripts |--core_spec.cljs
when I run
lein with-profile test cljsbuild test test
I get
Fontconfig warning: ignoring UTF-8: not a valid region tag ReferenceError: Can't find variable: require bin/speclj.js:3 in global code :0 in injectJs ReferenceError: Can't find variable: speclj phantomjs://webpage.evaluate():2 phantomjs://webpage.evaluate():6
What is the error about?
added a new build config
{
:id "test"
:source-paths ["src/cljs" "spec/cljs"]
:compiler {
:main scripts.core
:output-to "resources/public/js/main.js"
:output-dir "resources/public/js/out"
:optimizations :none
:pretty-print true
:target :nodejs
:notify-commands ["bin/phantomjs" "bin/speclj.js" "build/js/main.js"]
}
}
Same error
+1