Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
feat: support tunnelIdentifier
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Jan 10, 2014
1 parent 6b049cf commit a1bac53
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ var createBrowserStackTunnel = function(logger, config, emitter) {
return q();
}

if (!bsConfig.tunnelIdentifier) {
bsConfig.tunnelIdentifier = 'karma' + Math.random();
}

log.debug('Establishing the tunnel on %s:%s', config.hostname, config.port);

var deferred = q.defer();
var tunnel = new BrowserStackTunnel({
key: process.env.BROWSER_STACK_ACCESS_KEY || bsConfig.accessKey,
tunnelIdentifier: bsConfig.tunnelIdentifier,
hosts: [{
name: config.hostname,
port: config.port,
Expand Down Expand Up @@ -93,6 +98,7 @@ var BrowserStackBrowser = function(id, emitter, args, logger,
os_version: args.os_version,
device: args.device,
browser: args.browser,
tunnelIdentifier: bsConfig.tunnelIdentifier,
// TODO(vojta): remove "version" (only for B-C)
browser_version: args.browser_version || args.version || 'latest',
url: url + '?id=' + id + '&return_url=about:blank',
Expand Down

0 comments on commit a1bac53

Please sign in to comment.