added tests so we can easily run QUnit tests in headless mode inside a stand alone JUnit test without Selenium; with just Rhino. JsArrayTest works great in Rhino stand alone and in a browser; but not Selenium; not sure why yet...

This commit is contained in:
James Strachan
2012-07-05 21:40:06 +01:00
parent 6e3346c019
commit 33ef414f01
16 changed files with 461 additions and 18 deletions
+28
View File
@@ -0,0 +1,28 @@
(function () {
QUnit.init();
QUnit.config.blocking = true;
QUnit.config.autorun = true;
QUnit.config.updateRate = 0;
QUnit.results = []
QUnit.log = function (log) {
var outcome = log.result ? "PASS" : "FAIL";
QUnit.results.push(outcome + log.message)
};
})();
function runQUnitSuite() {
QUnit.begin();
QUnit.start();
/*
var answer = ""
var results = QUnit.results;
for (var i = 0, size = results.length; i < size; i++) {
answer += results[i];
answer += "\n";
}
return answer
*/
return QUnit.results;
}