mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX qunit test runner for phantomjs 2.0
This commit is contained in:
@@ -2,13 +2,17 @@
|
||||
/*global QUnit, ANSI */
|
||||
// THIS FILE IS CALLED BY "qunit_runner.rb" IN AUTOSPEC
|
||||
|
||||
if (phantom.args.length !== 1) {
|
||||
var system = require('system'),
|
||||
args = system.args;
|
||||
|
||||
args.shift();
|
||||
|
||||
if (args.length !== 1) {
|
||||
console.log("Usage: " + phantom.scriptName + " <URL>");
|
||||
phantom.exit(1);
|
||||
}
|
||||
|
||||
var system = require('system'),
|
||||
fs = require('fs'),
|
||||
var fs = require('fs'),
|
||||
page = require('webpage').create(),
|
||||
QUNIT_RESULT = "./tmp/qunit_result";
|
||||
|
||||
@@ -34,7 +38,7 @@ page.start = new Date();
|
||||
// -----------------------------------WARNING --------------------------------------
|
||||
// calling "console.log" BELOW this line will go through the "page.onConsoleMessage"
|
||||
// -----------------------------------WARNING --------------------------------------
|
||||
page.open(phantom.args[0], function (status) {
|
||||
page.open(args[0], function (status) {
|
||||
if (status !== "success") {
|
||||
console.log("\nNO NETWORK :(\n");
|
||||
phantom.exit(1);
|
||||
|
||||
Reference in New Issue
Block a user