xo: Lint *.js too.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2020-03-04 20:47:41 -08:00
parent dee2f05ac0
commit 40bf2a1f20
10 changed files with 185 additions and 192 deletions

View File

@@ -1,17 +1,19 @@
const test = require('tape')
const setup = require('./setup')
const test = require('tape');
const setup = require('./setup');
// Create new org link should open in the default browser [WIP]
test('new-org-link', function (t) {
t.timeoutAfter(50e3)
setup.resetTestDataDir()
const app = setup.createApp()
setup.waitForLoad(app, t)
.then(() => app.client.windowByIndex(1)) // focus on webview
.then(() => app.client.click('#open-create-org-link')) // Click on new org link button
.then(() => setup.wait(5000))
.then(() => setup.endTest(app, t),
(err) => setup.endTest(app, t, err || 'error'))
})
test('new-org-link', async t => {
t.timeoutAfter(50e3);
setup.resetTestDataDir();
const app = setup.createApp();
try {
await setup.waitForLoad(app, t);
await app.client.windowByIndex(1); // Focus on webview
await app.client.click('#open-create-org-link'); // Click on new org link button
await setup.wait(5000);
await setup.endTest(app, t);
} catch (error) {
await setup.endTest(app, t, error || 'error');
}
});