Skip to content

Commit

Permalink
Setup ssl-protocol=any by default and add ssl-errors option
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Hananein committed Aug 13, 2015
1 parent bf2cc09 commit 65c6bef
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bin/mocha-phantomjs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ program
.option('-v, --view <width>x<height>', 'specify phantom viewport size', viewport)
.option('-C, --no-color', 'disable color escape codes')
.option('-p, --path <path>', 'path to PhantomJS binary')
.option('--ignore-resource-errors', 'ignore resource errors');
.option('--ssl-protocol <protocol>', 'sets the SSL protocol for secure connections [tlsv1|sslv2|sslv3|any]', 'tlsv1')
.option('--ignore-resource-errors', 'ignore resource errors')
.option('--ignore-ssl-errors', 'ignore SSL errors');


program.on('--help', function(){
console.log(' Examples:');
Expand Down Expand Up @@ -149,7 +152,11 @@ function launchFailure(e) {
}

try {
var phantomjs = spawn(phantomPath, [script, page, reporter, config]);
var phantomjs = spawn(phantomPath, [
'--ssl-protocol=' + program.sslProtocol,
'--ignore-ssl-errors=' + program.ignoreSslErrors.toString(),
script, page, reporter, config
]);
phantomjs.stdout.pipe(process.stdout);
phantomjs.stderr.pipe(process.stderr);
phantomjs.on('exit', function(code){
Expand Down

0 comments on commit 65c6bef

Please sign in to comment.