browserstacktunnel-wrapper
Advanced tools
Comparing version 1.3.0 to 1.3.1
{ | ||
"name": "browserstacktunnel-wrapper", | ||
"description": "A Node.js wrapper for the BrowserStack java tunnel client ", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"homepage": "https://github.com/pghalliday/node-BrowserStackTunnel.git", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -39,3 +39,4 @@ node-BrowserStackTunnel | ||
proxyPort: PROXY_PORT, // optionally set the -proxyPort option | ||
proxyHost: PROXY_HOST // optionally set the -proxyHost option | ||
proxyHost: PROXY_HOST, // optionally set the -proxyHost option | ||
force: false // optionally set the -force option | ||
}); | ||
@@ -42,0 +43,0 @@ |
@@ -56,2 +56,6 @@ var util = require('util'), | ||
if (options.force) { | ||
params.push('-force'); | ||
} | ||
if (options.proxyHost) { | ||
@@ -58,0 +62,0 @@ params.push('-proxyHost', options.proxyHost); |
@@ -393,2 +393,36 @@ var expect = require('expect.js'), | ||
it('should support the force option', function (done) { | ||
spawnSpy.reset(); | ||
var browserStackTunnel = new bs.BrowserStackTunnel({ | ||
key: KEY, | ||
hosts: [{ | ||
name: HOST_NAME, | ||
port: PORT, | ||
sslFlag: SSL_FLAG | ||
}], | ||
force: 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, | ||
HOST_NAME + ',' + PORT + ',' + SSL_FLAG, | ||
'-force' | ||
] | ||
); | ||
done(); | ||
} | ||
}); | ||
setTimeout(function () { | ||
process.emit('mock:child_process:stdout:data', 'monkey----- Press Ctrl-C to exit ----monkey'); | ||
}, 100); | ||
}); | ||
it('should support the skipCheck option', function (done) { | ||
@@ -395,0 +429,0 @@ spawnSpy.reset(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
48409
1292
73