fix the run-qunit scripts with backward compatible syntax

This commit is contained in:
Régis Hanol
2015-08-25 17:37:36 +02:00
parent d81327f4ac
commit e7e96eb8af
2 changed files with 13 additions and 6 deletions
+5 -2
View File
@@ -3,9 +3,12 @@
/*globals QUnit phantom*/
var system = require("system"),
args = system.args;
args = phantom.args;
args.shift();
if (args === undefined) {
args = system.args;
args.shift();
}
if (args.length < 1 || args.length > 2) {
console.log("Usage: " + phantom.scriptName + " <URL> <timeout>");