const isLocal = args.indexOf('--local') > -1
const getServer =
- args.indexOf('--dev') > -1
- ? null
- : // : process.env.CI || args.indexOf('--ci') > -1
- // ? require('./staticServer')
- require('./devServer')
+ args.indexOf('--dev') > -1 ? () => null : require('./devServer')
;(async () => {
const server = await getServer()
await runNighwatchCli().finally(() => {
// Code to stop browserstack local after end of single test
bs_local.stop(() => {
- server.close()
+ server?.close()
})
})
}
)
} else {
await runNighwatchCli()
- server.close()
+ server?.close()
}
} catch (ex) {
console.log('There was an error while starting the test runner:\n\n')
process.stderr.write(ex.stack + '\n')
- server.close()
+ server?.close()
process.exit(2)
}
})()
page_objects_path: ['node_modules/nightwatch/examples/pages/'],
// See https://nightwatchjs.org/guide/extending-nightwatch/custom-commands.html
- custom_commands_path: ['node_modules/nightwatch/examples/custom-commands/'],
+ custom_commands_path: ['node_modules/nightwatch-helpers/commands'],
// See https://nightwatchjs.org/guide/extending-nightwatch/custom-assertions.html
- custom_assertions_path: '',
+ custom_assertions_path: ['node_modules/nightwatch-helpers/assertions'],
// See https://nightwatchjs.org/guide/extending-nightwatch/plugin-api.html
plugins: [],