Skip to content

Commit d6a5d1c

Browse files
committed
Merge remote-tracking branch 'ldabiralai/master'
2 parents 31ea527 + 2b4e615 commit d6a5d1c

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

lib/Local.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function Local(){
1919

2020
this.start = function(options, callback){
2121
if(typeof callback !== 'function')
22-
callback = function(){};
22+
callback = function() {};
2323

2424
this.userArgs = [];
2525
var that = this;
@@ -108,7 +108,7 @@ function Local(){
108108

109109
this.stop = function (callback) {
110110
if(typeof callback !== 'function')
111-
callback = function(){};
111+
callback = function() {};
112112

113113
if(!this.pid) return callback();
114114
this.opcode = 'stop';

test/local.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ describe('Local', function () {
182182
});
183183

184184
it('should set proxy', function (done) {
185-
bsLocal.start({
186-
'key': process.env.BROWSERSTACK_ACCESS_KEY,
187-
onlyCommand: true,
185+
bsLocal.start({
186+
'key': process.env.BROWSERSTACK_ACCESS_KEY,
187+
onlyCommand: true,
188188
'proxyHost': 'localhost',
189189
'proxyPort': 8080,
190190
'proxyUser': 'user',
@@ -208,7 +208,15 @@ describe('Local', function () {
208208
expect(bsLocal.getBinaryArgs().indexOf('localhost,8000,0')).to.not.equal(-1);
209209
done();
210210
});
211-
});
211+
})
212+
213+
it('does not error if no callback in stop', function (done) {
214+
this.timeout(60000);
215+
bsLocal.start({ 'key': process.env.BROWSERSTACK_ACCESS_KEY }, function(){
216+
bsLocal.stop();
217+
done();
218+
});
219+
})
212220

213221
afterEach(function (done) {
214222
this.timeout(60000);

0 commit comments

Comments
 (0)