Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Fix phantom args references for phantomjs 2.0.0+ #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions lib/wrapper/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ Timeout: Specify a timeout (override too) to kill a test
var waitTimer,
waitCounter = 0,
testTimer,
file = phantom.args[0],
timeout = parseInt(phantom.args[1], 10),
phantomArgs = phantom.args || require('system').args.slice(1),
file = phantomArgs[0],
timeout = parseInt(phantomArgs[1], 10),
timer,
exited = false,
debug = false, //Internal debugging of wrapper
logConsole = (phantom.args[2] === 'true' ? true : false),
logConsole = (phantomArgs[2] === 'true' ? true : false),
log = function(a, b) {
b = (typeof b === 'undefined') ? '' : b;
if (debug) {
Expand Down Expand Up @@ -195,7 +196,7 @@ var executeTest = function(file, cb) {
};


if (!phantom.args.length) {
if (!phantomArgs.length) {
console.log('Please provide some test files to execute');
phantom.exit(1);
}
Expand Down