Skip to content

Commit 74aee37

Browse files
author
Junaid Rasheed
authored
Merge pull request #35 from jmhomedes/remove-default-browser
set default chrome-latest config only when no alternative browser config supplied
2 parents c98ec1c + 56e8737 commit 74aee37

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/index.es6

+8-4
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,20 @@ var getGemini = function(options) {
5353
},
5454
gridUrl: 'http://127.0.0.1:4444/wd/hub',
5555
screenshotsDir: options.gridScreenshotsDir,
56-
browsers: {
56+
windowSize: '1024x768'
57+
}
58+
59+
if(!options.geminiOptions.browsers || !Object.keys(options.geminiOptions.browsers).length){
60+
geminiOptions.browsers = {
5761
"chrome-latest": {
5862
desiredCapabilities: {
5963
browserName: 'chrome',
6064
version: '37.0'
6165
}
6266
}
63-
},
64-
windowSize: '1024x768'
67+
};
6568
}
69+
6670
geminiOptions = _.merge(geminiOptions, options.geminiOptions);
6771

6872
return new Gemini(geminiOptions);
@@ -113,7 +117,7 @@ module.exports.test = function(options) {
113117
var test = function(file, enc, callback) {
114118

115119
var gemini = getGemini(options);
116-
120+
117121
// Run test server
118122
runTestServer(options.testServer);
119123

0 commit comments

Comments
 (0)