Closed GetContented closed 9 years ago
Oh, and this is the TOP of the error messages:
Compiling ClojureScript.
Compiling "target/tests.js" from ["src/cljs" "target/classes" "src/cljs" "spec/clj" "spec/cljs"]...
ReferenceError: Can't find variable: speclj
phantomjs://webpage.evaluate():2
phantomjs://webpage.evaluate():6
phantomjs://webpage.evaluate():6
Compiling "target/tests.js" failed.
clojure.lang.ExceptionInfo: Could not locate specljs/core__init.class or specljs/core.clj on classpath: at line 1
... and this is my bin/speclj file:
var fs = require("fs");
var p = require('webpage').create();
var sys = require('system');
p.onConsoleMessage = function (x) {
fs.write("/dev/stdout", x, "w");
};
p.injectJs(phantom.args[0]);
var result = p.evaluate(function () {
speclj.run.standard.armed = true;
return speclj.run.standard.run_specs(
cljs.core.keyword("color"), true
);
});
phantom.exit(result);
Based on the clojure.lang.ExceptionInfo: Could not locate specljs/core__init.class or specljs/core.clj on classpath: at line 1
error, it looks like there's something trying to (:require [specljs.core])
, but I don't see this error, and I don't see anything in the 3.1.0 release that tries to load such a file.
Any chance you had a stray s
character in your specs, such that (:require [specljs.core])
was there instead of (require [speclj.core])
?
Thank you so much for your comments...
I tried... different error now, and I'm not sure I even got it to run...I'll try again later. The setup for testing cljs seem incredibly complicated to me... it'd be nice if there were clear instructions about what everything did. Oh well :)
Thanks for the help.
Yeah, agreed, cljs tooling needs work. In my (limited) experience with cljs tooling, the problem is often mismatches in version support across tools (lein-cljsbuild, clojurescript, other libraries), and how the APIs change.
I'll close this for now - feel free to re-open if you get this error again on a recent release of speclj, and feel free to open another issue if you have a different error.
Thank you very much :)
I'm having issues too, (run-specs
apparently uses require
function, which isn't available in CLJS environment. Hence TypeError: undefined is not an object (evaluating 'cljs.core.require.call')
Hi Using speclj 3.1.0 The clj side is working beautifully, but I can't for the life of me get the cljs side working. I installed the script in bin/speclj, and I'm fairly sure my project is right.
Relevant portion of my project.cljs file:
The file under test is a simple dummy file, not one using cljx yet. I can build files just fine and it runs in my browser like a lovely thing. I'm just trying to get the cljs tests side set up.
This is the rest of the pertinent bits of my project file:
I'm using cljsbuild 1.0.3, clj 1.6.0 and cljs 0.0-2322
Ordinarily I'd just post to stack overflow, but getting this set up was a major pain, and I'd be incredibly surprised if others didn't have the same problem. It took me ages to realise that the cljs side was baked into the clj project... so I was hunting around the web for a "specljs"...
FWIW, I've tried cleaning several times, too.