Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(driverProviders): Check config in the right place. #3991

Merged
merged 2 commits into from
Jan 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/driverProviders/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@ export class Local extends DriverProvider {

let serverConf = this.config_.localSeleniumStandaloneOpts || {};

if (!Array.isArray(serverConf.jvmArgs)) {
throw new ConfigError(logger, 'jvmArgs should be an array.');
}

// If args or port is not set use seleniumArgs and seleniumPort
// for backward compatibility
if (serverConf.args === undefined) {
serverConf.args = this.config_.seleniumArgs || [];
}
if (serverConf.jvmArgs === undefined) {
serverConf.jvmArgs = this.config_.jvmArgs || [];
} else {
if (!Array.isArray(serverConf.jvmArgs)) {
throw new ConfigError(logger, 'jvmArgs should be an array.');
}
}
if (serverConf.port === undefined) {
serverConf.port = this.config_.seleniumPort;
Expand Down