mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 04:01:29 -05:00
fix the run-qunit scripts with backward compatible syntax
This commit is contained in:
parent
d81327f4ac
commit
e7e96eb8af
2 changed files with 13 additions and 6 deletions
|
@ -1,11 +1,15 @@
|
|||
/*jshint devel:true, phantom:true */
|
||||
/*global QUnit, ANSI */
|
||||
/*globals QUnit ANSI */
|
||||
|
||||
// THIS FILE IS CALLED BY "qunit_runner.rb" IN AUTOSPEC
|
||||
|
||||
var system = require('system'),
|
||||
args = system.args;
|
||||
var system = require("system"),
|
||||
args = phantom.args;
|
||||
|
||||
args.shift();
|
||||
if (args === undefined) {
|
||||
args = system.args;
|
||||
args.shift();
|
||||
}
|
||||
|
||||
if (args.length !== 1) {
|
||||
console.log("Usage: " + phantom.scriptName + " <URL>");
|
||||
|
|
7
vendor/assets/javascripts/run-qunit.js
vendored
7
vendor/assets/javascripts/run-qunit.js
vendored
|
@ -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>");
|
||||
|
|
Loading…
Reference in a new issue