Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

KNE uses too many global environment variables #34

Open
webteckie opened this issue Jan 27, 2017 · 0 comments
Open

KNE uses too many global environment variables #34

webteckie opened this issue Jan 27, 2017 · 0 comments

Comments

@webteckie
Copy link
Contributor

KNE uses to many global environment variables making the code hard to reason about. A possible alternative may be to gather all settings that are required by the Nightwatch runner into a kneSettings export and require that in nightwatch.conf.js to apply directly to the settings. For example:

export kneSettings = {
  startSeleniumProcess: [true/false],
  browserName: <name>,
  browserVersion: <version>,
  etc.
}

Then in nightwatch.conf.js:

var kneSettings = require('.').kneSettings;

if (kneSettings.browserName) {
	settings.test_settings[process.env.KNE_TEST_ENV].desiredCapabilities.browserName = kneSettings.browserName;
}

...
@stennie stennie changed the title KNE uses to many global environment variables KNE uses too many global environment variables Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant