searls/jasmine-maven-plugin — Issue #60: Certain HtmlUnit Exceptions aren't handled correctly
Author: OttoAllmendinger
Created: 2012-01-24 17:06:23+00:00
State: open

Maven yields `Build Success` even though an exception occurs during

[INFO] --- jasmine-maven-plugin:1.1.0:test (default) @ resourceplanning ---
[INFO] Executing Jasmine Specs
Jan 24, 2012 5:50:35 PM
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl
runSingleJob
SEVERE: Job run failed with unexpected RuntimeException:
Wrapped com.gargoylesoftware.htmlunit.ScriptException:
Wrapped java.lang.RuntimeException: java.io.FileNotFoundException: /home/otto/src/workspace/synRP/target/jasmine/src/lib/jQuery.js (No such file or directory)
[....]

== CALLING JAVASCRIPT ==

function (evt) {
var node = evt.currentTarget || evt.srcElement, contextName, moduleName, context;
if (evt.type === "load" || (node && readyRegExp.test(node.readyState))) {
interactiveScript = null;
contextName = node.getAttribute("data-requirecontext");
moduleName = node.getAttribute("data-requiremodule");
context = contexts[contextName];
contexts[contextName].completeLoad(moduleName);
if (node.detachEvent && !isOpera) {
node.detachEvent("onreadystatechange", req.onScriptLoad);
} else {
node.removeEventListener("load", req.onScriptLoad, false);
}
}
}

======= EXCEPTION END ========
== CALLING JAVASCRIPT ==

function () {
ctx.requireWait = false;
ctx.takeGlobalQueue();
if (!ctx.scriptCount) {
ctx.resume();
}
req.checkReadyState();
}

======= EXCEPTION END ========
[INFO]
-------------------------------------------------------
J A S M I N E S P E C S
-------------------------------------------------------
[INFO]
jasmine
works

jasmine
has require
loads synRP module
loads underscore

Results: 4 specs, 0 failures

[...]

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

If a `throw "foo"` statement is encountered, the build fails as expected.