diff --git a/index.js b/index.js index 3008b16..8a1b3d7 100644 --- a/index.js +++ b/index.js @@ -68,8 +68,14 @@ const LocalWebDriverBase = function(baseBrowserDecorator, args, logger) { log.debug('config:', JSON.stringify(config)); - const extraSpecs = - _.merge(this.constructor.EXTRA_WEBDRIVER_SPECS, args.config); + const extraSpecs = _.mergeWith( + this.constructor.EXTRA_WEBDRIVER_SPECS, + args.config, + (objValue, srcValue) => { + if (Array.isArray(objValue)) { + return objValue.concat(srcValue); + } + }); log.debug('extraSpecs:', extraSpecs); // These names ("browser" and "spec") are needed for compatibility with