Skip to content

Commit 7fa9b37

Browse files
committed
lint errors
1 parent 18d68af commit 7fa9b37

File tree

4 files changed

+8
-16
lines changed

4 files changed

+8
-16
lines changed

bin/runner.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,6 @@ var statusPoller = {
299299
if (!worker.isAckd) {
300300
logger.trace('[%s] worker.activityTimeout', worker.id);
301301

302-
var subject = 'Worker inactive for too long: ' + worker.string;
303-
var content = 'Worker details:\n' + JSON.stringify(worker.config, null, 4);
304302
delete workers[workerData.key];
305303
delete workerKeys[worker.id];
306304
config.status += 1;
@@ -327,8 +325,6 @@ var statusPoller = {
327325
if (worker.isAckd) {
328326
logger.trace('[%s] worker.testActivityTimeout', worker.id);
329327

330-
var subject = 'Tests timed out on: ' + worker.string;
331-
var content = 'Worker details:\n' + JSON.stringify(worker.config, null, 4);
332328
delete workers[workerData.key];
333329
delete workerKeys[worker.id];
334330
config.status += 1;
@@ -422,5 +418,5 @@ exports.test = function(config_file, callback) {
422418
} catch (e) {
423419
callback(e);
424420
}
425-
}
421+
};
426422
exports.cleanUpAndExit = cleanUpAndExit;

lib/config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,17 @@ exports.config = function(config_path) {
4646

4747
if (process.env.BROWSERSTACK_KEY) {
4848
this.key = process.env.BROWSERSTACK_KEY;
49+
delete config.key;
4950
}
5051

5152
if (process.env.BROWSERSTACK_ACCESS_KEY) {
5253
this.key = process.env.BROWSERSTACK_ACCESS_KEY;
54+
delete config.key;
5355
}
5456

5557
if (process.env.BROWSERSTACK_USERNAME) {
5658
this.username = process.env.BROWSERSTACK_USERNAME;
59+
delete config.username;
5760
}
5861

5962
if (!config.project) {
@@ -72,8 +75,9 @@ exports.config = function(config_path) {
7275
this.build = commit_id ? 'Commit-' + commit_id.slice(0, commit_id.length / 2) : 'Local run, ' + new Date().toISOString();
7376
}
7477

78+
var that = this;
7579
['username', 'key', 'browsers', 'test_path'].forEach(function(param) {
76-
if (typeof config[param] === 'undefined' && typeof this[param] === 'undefined') {
80+
if (typeof config[param] === 'undefined' && typeof that[param] === 'undefined') {
7781
console.error('Configuration parameter `%s` is required.', param);
7882
process.exit(1);
7983
}
@@ -100,4 +104,4 @@ exports.config = function(config_path) {
100104
for (var key in config) {
101105
this[key] = config[key];
102106
}
103-
}
107+
};

lib/local.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ var Log = require('./logger'),
44
fs = require('fs'),
55
https = require('https'),
66
windows = ((process.platform.match(/win32/) || process.platform.match(/win64/)) !== null),
7-
localBinary = __dirname + '/BrowserStackLocal' + (windows ? '.exe' : ''),
8-
utils = require('./utils');
7+
localBinary = __dirname + '/BrowserStackLocal' + (windows ? '.exe' : '');
98

109
var Tunnel = function Tunnel(key, port, uniqueIdentifier, config, callback) {
1110
var that = {};

lib/utils.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
var Log = require('./logger'),
2-
logger = new Log(global.logLevel),
3-
http = require('http'),
4-
url = require('url'),
5-
querystring = require('querystring'),
6-
config;
7-
81
String.prototype.escapeSpecialChars = function() {
92
return this.replace(/\n/g, '\\n')
103
.replace(/\r/g, '\\r')

0 commit comments

Comments
 (0)