Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function createSession(options: IOptions): Promise {
if (options) {
deleteRunner();
}
const runner = createRunner(options);
const settings = runner.test_settings;
client =
runnerOptions && runnerOptions.silent
? createClient(settings)
: createClient(settings, new reporter());
log(`Creating session for ${runner.testEnv} environment on port ${settings.webdriver.port}`);
await client.startSession();
log(`Session created for ${runner.testEnv} environment`);
return client.api;
}
export async function createSession(options: IOptions): Promise {
if (options) {
deleteRunner();
}
const runner = createRunner(options);
const settings = runner.test_settings;
client =
runnerOptions && runnerOptions.silent
? createClient(settings)
: createClient(settings, new reporter());
log(`Creating session for ${runner.testEnv} environment on port ${settings.webdriver.port}`);
await client.startSession();
log(`Session created for ${runner.testEnv} environment`);
return client.api;
}