Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mocha-phantomjs does not use the -p option #65

Closed
SirZach opened this issue May 28, 2013 · 1 comment
Closed

mocha-phantomjs does not use the -p option #65

SirZach opened this issue May 28, 2013 · 1 comment

Comments

@SirZach
Copy link

SirZach commented May 28, 2013

program
  .version(JSON.parse(fs.readFileSync(__dirname + '/../package.json', 'utf8')).version)
  .usage('[options] page')
  .option('-R, --reporter <name>',       'specify the reporter to use', 'spec')
  .option('-t, --timeout <timeout>',     'specify the test startup timeout to use', parseInt, 6000)
  .option('-A, --agent <userAgent>',     'specify the user agent to use')
  .option('-c, --cookies <Object>',      'phantomjs cookie object http://git.io/RmPxgA', cookiesParser) // http://git.io/RmPxgA
  .option('-h, --header <name>=<value>', 'specify custom header', header)
  .option('-s, --setting <key>=<value>', 'specify specific phantom settings', setting)
  .option('-v, --view <width>x<height>', 'specify phantom viewport size', viewport)
  .option('-C, --no-color',              'disable color escape codes');

program.on('--help', function(){
  console.log('  Examples:');
  console.log('');
  console.log('    $ mocha-phantomjs -R dot /test/file.html');
  console.log('    $ mocha-phantomjs http://testserver.com/file.html');
  console.log('');
});

No longer takes the -p option. Even in the code itself,

for (var i=0; i < module.paths.length; i++) {
  var bin = path.join(module.paths[i], '.bin/phantomjs');
  if (process.platform === 'win32') {
    bin += '.cmd';
  }
  if (exists(bin)) {
    phantomjs = spawn(bin, spawnArgs);
    break;
  }
}

It's cycling through the node_modules paths. I need the -p to specify where phantomjs is since I don't have it in a normal place and the -p was there at one point.

@SirZach
Copy link
Author

SirZach commented May 28, 2013

I see that here on github the code looks like it takes the -p option but if you grab mocha-phantomjs from npm, it does not.

metaskills added a commit that referenced this issue Sep 26, 2013
fix #65: Added message back to user when the path given does not exist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant