build: Initial linting setup (#1560)

* sets up linting config and runs `yarn lint --fix` once, so that all changes will show up correctly in future PRs.

* Note that there are still a lot of linter errors.
This commit is contained in:
Nathan Nichols
2021-08-26 21:22:40 -05:00
committed by Mayukha Vadari
parent 12cfed5c17
commit 8b95ee5fab
286 changed files with 15508 additions and 12691 deletions

View File

@@ -1,30 +1,35 @@
import assert from 'assert'
import puppeteer from 'puppeteer'
import { expect, assert } from "chai";
import puppeteer from "puppeteer";
describe("Browser Tests", () => {
it("Integration Tests", async () => {
const browser = await puppeteer.launch({"headless": true});
try {
const page = await browser.newPage().catch();
await page.goto(`file:///${__dirname}/../localIntegrationRunner.html`);
describe("Browser Tests", function () {
it("Integration Tests", async function () {
const browser = await puppeteer.launch({ headless: true });
try {
const page = await browser.newPage().catch();
await page.goto(`file:///${__dirname}/../localIntegrationRunner.html`);
await page.waitForFunction('document.querySelector("body").innerText.includes("submit multisigned transaction")');
await page.waitForFunction(
'document.querySelector("body").innerText.includes("submit multisigned transaction")'
);
const fails = await page.evaluate(() => {
return document.querySelector('.failures').textContent
})
const passes = await page.evaluate(() => {
return document.querySelector('.passes').textContent
})
const fails = await page.evaluate(() => {
const element = document.querySelector(".failures");
assert.equal(fails, "failures: 0")
assert.notEqual(passes, "passes: 0")
return element == null ? null : element.textContent;
});
const passes = await page.evaluate(() => {
const element = document.querySelector(".passes");
} catch (err) {
console.log(err)
assert(false)
} finally {
await browser.close();
}
}).timeout(40000)
})
return element == null ? null : element.textContent;
});
expect(fails).to.equal("failures: 0");
expect(passes).to.not.equal("passes: 0");
} catch (err) {
console.log(err);
assert(false);
} finally {
await browser.close();
}
}).timeout(40000);
});