diff --git a/Resources/js/run-qunit.js b/Resources/js/run-qunit.js index fe57a05e..56cb709e 100644 --- a/Resources/js/run-qunit.js +++ b/Resources/js/run-qunit.js @@ -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. @@ -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(); } @@ -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();