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:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user