Skip to content

Commit

Permalink
replace phantom.args by system.args (#215)
Browse files Browse the repository at this point in the history
reason: new version of phantom removed phantom.args.
  • Loading branch information
monteiro authored Sep 7, 2017
1 parent 2f0181d commit 078d1d8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Resources/js/run-qunit.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var system = require('system');

/**
* Wait until the test condition is true or a timeout occurs. Useful for waiting
* on a server response or for a ui change (fadeIn, etc.) to occur.
Expand Down Expand Up @@ -31,10 +33,9 @@ function waitFor(testFx, onReady, timeOutMillis) {
}
}
}, 100); //< repeat check every 250ms
};

}

if (phantom.args.length === 0 || phantom.args.length > 2) {
if (system.args.length === 1 || system.args.length > 3) {
console.log('Usage: run-qunit.js URL');
phantom.exit();
}
Expand All @@ -46,7 +47,7 @@ page.onConsoleMessage = function(msg) {
console.log(msg);
};

page.open(phantom.args[0], function(status){
page.open(system.args[1], function(status){
if (status !== "success") {
console.log("Unable to access network");
phantom.exit();
Expand Down

0 comments on commit 078d1d8

Please sign in to comment.