mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
fix the run-qunit scripts with backward compatible syntax
This commit is contained in:
@@ -1,11 +1,15 @@
|
|||||||
/*jshint devel:true, phantom:true */
|
/*jshint devel:true, phantom:true */
|
||||||
/*global QUnit, ANSI */
|
/*globals QUnit ANSI */
|
||||||
|
|
||||||
// THIS FILE IS CALLED BY "qunit_runner.rb" IN AUTOSPEC
|
// THIS FILE IS CALLED BY "qunit_runner.rb" IN AUTOSPEC
|
||||||
|
|
||||||
var system = require('system'),
|
var system = require("system"),
|
||||||
args = system.args;
|
args = phantom.args;
|
||||||
|
|
||||||
args.shift();
|
if (args === undefined) {
|
||||||
|
args = system.args;
|
||||||
|
args.shift();
|
||||||
|
}
|
||||||
|
|
||||||
if (args.length !== 1) {
|
if (args.length !== 1) {
|
||||||
console.log("Usage: " + phantom.scriptName + " <URL>");
|
console.log("Usage: " + phantom.scriptName + " <URL>");
|
||||||
|
|||||||
+5
-2
@@ -3,9 +3,12 @@
|
|||||||
/*globals QUnit phantom*/
|
/*globals QUnit phantom*/
|
||||||
|
|
||||||
var system = require("system"),
|
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) {
|
if (args.length < 1 || args.length > 2) {
|
||||||
console.log("Usage: " + phantom.scriptName + " <URL> <timeout>");
|
console.log("Usage: " + phantom.scriptName + " <URL> <timeout>");
|
||||||
|
|||||||
Reference in New Issue
Block a user