browserstacktunnel-wrapper
Advanced tools
Comparing version 2.0.1 to 2.0.2
{ | ||
"name": "browserstacktunnel-wrapper", | ||
"description": "A Node.js wrapper for the BrowserStack java tunnel client ", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"homepage": "https://github.com/pghalliday/node-BrowserStackTunnel.git", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -42,2 +42,3 @@ node-BrowserStackTunnel | ||
onlyAutomate: false, // optionally set the -onlyAutomate option | ||
enableLoggingForApi: true // optionally set the -enable-logging-for-api option | ||
}); | ||
@@ -44,0 +45,0 @@ |
@@ -66,2 +66,6 @@ var util = require('util'), | ||
if (options.enableLoggingForApi) { | ||
params.push('--enable-logging-for-api'); | ||
} | ||
if (options.proxyHost) { | ||
@@ -68,0 +72,0 @@ params.push('--proxy-host', options.proxyHost); |
@@ -494,2 +494,37 @@ var expect = require('expect.js'), | ||
it('should support the enableLoggingForApi option', function (done) { | ||
spawnSpy.reset(); | ||
var browserStackTunnel = new bs.BrowserStackTunnel({ | ||
key: KEY, | ||
hosts: [{ | ||
name: HOST_NAME, | ||
port: PORT, | ||
sslFlag: SSL_FLAG | ||
}], | ||
enableLoggingForApi: true, | ||
win32Bin: WIN32_BINARY_DIR | ||
}); | ||
browserStackTunnel.start(function (error) { | ||
if (error) { | ||
expect().fail(function () { return error; }); | ||
} else if (browserStackTunnel.state === 'started') { | ||
sinon.assert.calledOnce(spawnSpy); | ||
sinon.assert.calledWithExactly( | ||
spawnSpy, | ||
WIN32_BINARY_FILE, [ | ||
KEY, | ||
'--only', | ||
HOST_NAME + ',' + PORT + ',' + SSL_FLAG, | ||
'--enable-logging-for-api' | ||
] | ||
); | ||
done(); | ||
} | ||
}); | ||
setTimeout(function () { | ||
process.emit('mock:child_process:stdout:data', 'monkey----- Press Ctrl-C to exit ----monkey'); | ||
}, 100); | ||
}); | ||
it('should support the proxy options', function (done) { | ||
@@ -496,0 +531,0 @@ spawnSpy.reset(); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51771
1390
77
12