add qunit to autospec

This commit is contained in:
Régis Hanol
2013-11-01 23:57:50 +01:00
parent e679ba97a3
commit b56b11d96a
18 changed files with 921 additions and 571 deletions
+7 -9
View File
@@ -19,16 +19,14 @@ page.onConsoleMessage = function(msg) {
if (msg.slice(0,8) === 'WARNING:') { return; }
if (msg.slice(0,6) === 'DEBUG:') { return; }
// Hack to access the print method
// If there's a better way to do this, please change
if (msg.slice(0,6) === 'PRINT:') {
print(msg.slice(7));
return;
}
console.log(msg);
};
page.onCallback = function (message) {
// forward the message to the standard output
system.stdout.write(message);
};
page.open(args[0], function(status) {
if (status !== 'success') {
console.error("Unable to access network");
@@ -80,9 +78,9 @@ function logQUnit() {
var msg = " Test Failed: " + context.name + assertionErrors.join(" ");
testErrors.push(msg);
assertionErrors = [];
console.log('PRINT: F');
window.callPhantom('F');
} else {
console.log('PRINT: .');
window.callPhantom('.');
}
});