From 0f6afa3407d16170e2ed54d5dacb89336f4ffbe3 Mon Sep 17 00:00:00 2001 From: MickaelFontes <81414455+MickaelFontes@users.noreply.github.com> Date: Wed, 30 Oct 2024 21:27:20 +0100 Subject: [PATCH] style: :rotating_light: Formating --- __tests__/chromedriver.ts | 16 +++++++--------- src/setup-chromedriver.ts | 4 ++-- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/__tests__/chromedriver.ts b/__tests__/chromedriver.ts index 4835d5fc..7075ab86 100644 --- a/__tests__/chromedriver.ts +++ b/__tests__/chromedriver.ts @@ -1,17 +1,15 @@ -import { Builder, Capabilities, until, By, Key } from 'selenium-webdriver'; +import { Builder, Capabilities, until, By, Key } from "selenium-webdriver"; (async () => { const timeout = 30000; - const driver = new Builder() - .withCapabilities(Capabilities.chrome()) - .build(); + const driver = new Builder().withCapabilities(Capabilities.chrome()).build(); try { - await driver.get('https://google.com'); - await driver.wait(until.titleContains('Google'), timeout); + await driver.get("https://google.com"); + await driver.wait(until.titleContains("Google"), timeout); console.log(await driver.getTitle()); - const searchBox = await driver.findElement(By.name('q')); - await searchBox.sendKeys('ChromeDriver', Key.RETURN); - await driver.wait(until.titleContains('ChromeDriver'), timeout); + const searchBox = await driver.findElement(By.name("q")); + await searchBox.sendKeys("ChromeDriver", Key.RETURN); + await driver.wait(until.titleContains("ChromeDriver"), timeout); console.log(await driver.getTitle()); } finally { driver.quit(); diff --git a/src/setup-chromedriver.ts b/src/setup-chromedriver.ts index 255c672f..b5ca8c6f 100644 --- a/src/setup-chromedriver.ts +++ b/src/setup-chromedriver.ts @@ -23,13 +23,13 @@ async function run() { if (arch == "win32") { await exec.exec( "powershell -File " + - path.join(__dirname, "../lib", "setup-chromedriver.ps1 " + version) + path.join(__dirname, "../lib", "setup-chromedriver.ps1 " + version), ); } else { await exec.exec(path.join(__dirname, "../lib", "setup-chromedriver.sh"), [ version, arch, - chromeapp + chromeapp, ]); } } catch (error: unknown) {