Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function runNightwatch (done) {
console.log([moment().format('HH:mm:ss:SSS')] + ' kne: running nightwatch...');
try {
Nightwatch.cli(function (argv) {
// Set app-specific env for nightwatch session
process.env.KNE_TEST_ENV = argv.env;
if (argv['browser-name']) {
process.env.KNE_BROWSER_NAME = argv['browser-name'];
}
if (argv['browser-version']) {
process.env.KNE_BROWSER_VERSION = argv['browser-version'];
}
// If possible, argv inputs and environment variables will be merged together
// If not, argv inputs will override environment variables.
process.env.KNE_TEST_PATHS = process.env.KNE_TEST_PATHS || '';
if (argv.test_paths) {
// If argv.test_paths is set, add these paths to the environment variable