mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 21:27:16 -05:00
add qunit to autospec
This commit is contained in:
+7
-9
@@ -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('.');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user