Lint integration test files and browser test files (#1612)

* clean up utils

* more cleanup

* remove client.sign

* remove unneeded tests

* remove unneeded infra

* move helper functions to separate files

* fix linter issues

* more cleanup

* make helper functions more generally useful

* fix test account funding

* add import note to README

* lint browser tests

* run eslint --fix
This commit is contained in:
Mayukha Vadari
2021-09-13 15:41:54 -04:00
parent 0dc1e08350
commit 3f29e5781d
13 changed files with 259 additions and 610 deletions

View File

@@ -1,3 +1,5 @@
import path from 'path'
import { expect, assert } from 'chai'
import puppeteer from 'puppeteer'
@@ -6,7 +8,9 @@ describe('Browser Tests', function () {
const browser = await puppeteer.launch({ headless: true })
try {
const page = await browser.newPage().catch()
await page.goto(`file:///${__dirname}/../localIntegrationRunner.html`)
await page.goto(
path.join('file:///', __dirname, '../localIntegrationRunner.html'),
)
await page.waitForFunction(
'document.querySelector("body").innerText.includes("submit multisigned transaction")',
@@ -26,6 +30,7 @@ describe('Browser Tests', function () {
expect(fails).to.equal('failures: 0')
expect(passes).to.not.equal('passes: 0')
} catch (err) {
// eslint-disable-next-line no-console -- only prints if something goes wrong
console.log(err)
assert(false)
} finally {