Skip to content

Commit

Permalink
Fix unused import/missing semicolons codeql messages
Browse files Browse the repository at this point in the history
  • Loading branch information
glacambre committed Nov 10, 2022
1 parent bb9fbcd commit 17a189f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
12 changes: 6 additions & 6 deletions tests/_common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function retryTest(f: testFunction): testFunction {
result = await f(s, server, driver);
} catch (e) {
failures += 1;
failureLog += `\n\n===== ${s} attempt ${failures} =====\n`
failureLog += `\n\n===== ${s} attempt ${failures} =====\n`;
failureLog += e.stack.toString();
failureLog += e.toString();
failureLog += `\n== VimrcAfter ==:\n${readVimrc()}\n`;
Expand Down Expand Up @@ -470,7 +470,7 @@ const focusNextPrevTest = async (testTitle: string, server: any, driver: webdriv
await driver.wait(async () => "" !== (await driver.switchTo().activeElement().getAttribute("id")), WAIT_DELAY, "focus_prev did not change focused element");
expect(await driver.switchTo().activeElement().getAttribute("id")).toBe("before");
await server.pullCoverageData(frameSocket);
}
};

export const testFocusNextPrev1 = retryTest(withLocalPage("focusnext.html", focusNextPrevTest));
export const testFocusNextPrev2 = retryTest(withLocalPage("focusnext2.html", focusNextPrevTest));
Expand Down Expand Up @@ -506,7 +506,7 @@ ${backup}`);
await driver.wait(async () => (await input.getAttribute("value")) !== "", WAIT_DELAY, "Input value did not change");
const value = await input.getAttribute("value");
expect(value).toBe("Eval Works!");
await sendKeys(driver, `:call firenvim#eval_js("(()=>{throw new Error()})()", "OnResult")`.split("").concat([webdriver.Key.ENTER]))
await sendKeys(driver, `:call firenvim#eval_js("(()=>{throw new Error()})()", "OnResult")`.split("").concat([webdriver.Key.ENTER]));
await driver.wait(async () => (await input.getAttribute("value")) !== value, WAIT_DELAY, "Input value did not change the second time");
expect(await input.getAttribute("value")).toBe("{}");
await server.pullCoverageData(frameSocket);
Expand All @@ -530,7 +530,7 @@ export const testPressKeys = retryTest(withLocalPage("chat.html", async (testTit
await sendKeys(driver, ":call firenvim#press_keys('<Space>')".split("")
.concat(webdriver.Key.ENTER));
await driver.wait(async () => ((await input.getAttribute("value")) !== value), WAIT_DELAY, "Input value did not change");
expect(await input.getAttribute("value")).toBe("<C-Enter> pressed!<C-A> pressed!b pressed!Space pressed!")
expect(await input.getAttribute("value")).toBe("<C-Enter> pressed!<C-A> pressed!b pressed!Space pressed!");
await server.pullCoverageData(frameSocket);
}));

Expand Down Expand Up @@ -886,7 +886,7 @@ ${vimrcContent}`);
await sendKeys(driver, ":%s/b>/i>/g".split("")
.concat(webdriver.Key.ENTER)
.concat(":wq".split(""))
.concat(webdriver.Key.ENTER))
.concat(webdriver.Key.ENTER));
await driver.wait(Until.stalenessOf(span), WAIT_DELAY, "Firenvim span did not disappear");
await driver.wait(async () => (await input.getAttribute("innerHTML") !== innerHTML), WAIT_DELAY, "Input value did not change");
expect(await input.getAttribute("innerText")).toBe(innerText);
Expand Down Expand Up @@ -919,7 +919,7 @@ ${vimrcContent}`);
const [input, span] = await createFirenvimFor(server, driver, By.id("content-input"));
const innerText = await input.getAttribute("innerText");
const innerHTML = await input.getAttribute("innerHTML");
await sendKeys(driver, ":wq".split("").concat(webdriver.Key.ENTER))
await sendKeys(driver, ":wq".split("").concat(webdriver.Key.ENTER));
await driver.wait(Until.stalenessOf(span), WAIT_DELAY, "Firenvim span did not disappear");
await driver.wait(async () => (await input.getAttribute("innerHTML") !== innerHTML), WAIT_DELAY, "Input value did not change");
expect(await input.getAttribute("innerText")).toBe(innerText);
Expand Down
2 changes: 0 additions & 2 deletions tests/_vimrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const fs = require("fs");
const os = require("os");
const path = require("path");
const process = require("process");
const spawn = require("child_process").spawn;

let init_vim: string;

Expand All @@ -11,7 +10,6 @@ export function setupVimrc() {
process.env.XDG_CONFIG_HOME = path.join(base_dir, "config");
process.env.XDG_DATA_HOME = path.join(base_dir, "data");
const nvim_conf_dir = path.join(process.env.XDG_CONFIG_HOME, "nvim");
const nvim_data_dir = path.join(process.env.XDG_DATA_HOME, "nvim");
try {
fs.mkdirSync(nvim_conf_dir, { recursive: true });
fs.mkdirSync(nvim_conf_dir, { recursive: true });
Expand Down
1 change: 0 additions & 1 deletion tests/chrome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ import * as coverageServer from "./_coverageserver";

describe("Chrome", () => {

let nonHeadlessTest = () => env["HEADLESS"] ? test.skip : test;
let driver: any = undefined;
let server: any = coverageServer;
let background: any = undefined;
Expand Down
2 changes: 1 addition & 1 deletion tests/firefox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe("Firefox", () => {
try {
fs.rmdirSync(coverage_dir, { recursive: true });
} catch (e) {}
fs.mkdirSync(coverage_dir, { recursive: true })
fs.mkdirSync(coverage_dir, { recursive: true });

await coverageServer.start(12345, coverage_dir);
const backgroundPromise = coverageServer.getNextBackgroundConnection();
Expand Down

0 comments on commit 17a189f

Please sign in to comment.