I am trying to use RhinoUnit for unit testing of a standalone, XUL-based JavaScript app. I have successfully altered a lot of paths in the given build.xml
- mostly changing paths to RhinoUnit scripts, which I prefer to put in another directory than the default one (that is, I put RhinoUnit files in chrome/content/rhino
and JSLint files in chrome/content/lint
). On some moment, however, I've got this error:
/<project-path>/build.xml:52: javax.script.ScriptException:
sun.org.mozilla.javascript.internal.WrappedException: Wrapped
java.io.FileNotFoundException: /<project-path>/jslint/fulljslint.js
(No such file or directory) (<Unknown source>#31) in <Unknown source>
at line number 31
There is no reference to jslint/fulljslint.js
in the build.xml
, but I have found this code at jslintant.js
:
var jsLintPath = "jslint/fulljslint.js";
if (attributes.get("jslintpath")) {
jsLintPath = attributes.get("jslintpath");
}
It looked to me that this code sets a default value to the variable and then try to use the value from some attributes
object. I am supposing these attributes
can be set outside the script, through e.g. some <atttribute />
tag int build.xml
or some configuration file.
My question is: how could I change the value from the object? Is that possible? Or should I change the hardcoded string from the script?