Skip to content

Commit a7343c6

Browse files
committed
Different Log file for second instance
1 parent 0205de5 commit a7343c6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/local.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
var expect = require('expect.js'),
22
mocks = require('mocks'),
3+
path = require('path'),
4+
fs = require('fs'),
35
browserstack = require('../index');
46

57
describe('Local', function () {
@@ -29,11 +31,13 @@ describe('Local', function () {
2931
this.timeout(60000);
3032
bsLocal.start({ key: process.env.BROWSERSTACK_ACCESS_KEY }, function(){
3133
bsLocal_2 = new browserstack.Local();
34+
var tempLogPath = path.join(process.cwd(), 'log2.log');
3235
try{
33-
bsLocal_2.start({ key: process.env.BROWSERSTACK_ACCESS_KEY, logfile: "C:\\Users\\Admin\\Desktop\\local.log" }, function(){});
36+
bsLocal_2.start({ key: process.env.BROWSERSTACK_ACCESS_KEY, logfile: tempLogPath }, function(){});
3437
}
3538
catch(err){
3639
expect(err.toString().trim()).to.equal('LocalError: *** Error: Either another browserstack local client is running on your machine or some server is listening on port 45691');
40+
fs.unlinkSync(tempLogPath);
3741
done();
3842
}
3943
});

0 commit comments

Comments
 (0)