fix: remove xo, migration to eslint

This commit is contained in:
JellyBrick
2023-08-29 17:22:38 +09:00
parent 31a7588cee
commit c722896a73
142 changed files with 17210 additions and 18409 deletions

View File

@ -1,38 +1,38 @@
const path = require("path");
const path = require('node:path');
const { _electron: electron } = require("playwright");
const { test, expect } = require("@playwright/test");
const { _electron: electron } = require('playwright');
const { test, expect } = require('@playwright/test');
process.env.NODE_ENV = "test";
process.env.NODE_ENV = 'test';
const appPath = path.resolve(__dirname, "..");
const appPath = path.resolve(__dirname, '..');
test("YouTube Music App - With default settings, app is launched and visible", async () => {
const app = await electron.launch({
cwd: appPath,
args: [
appPath,
"--no-sandbox",
"--disable-gpu",
"--whitelisted-ips=",
"--disable-dev-shm-usage",
],
});
test('YouTube Music App - With default settings, app is launched and visible', async () => {
const app = await electron.launch({
cwd: appPath,
args: [
appPath,
'--no-sandbox',
'--disable-gpu',
'--whitelisted-ips=',
'--disable-dev-shm-usage',
],
});
const window = await app.firstWindow();
const window = await app.firstWindow();
const consentForm = await window.$(
"form[action='https://consent.youtube.com/save']"
);
if (consentForm) {
await consentForm.click("button");
}
const consentForm = await window.$(
"form[action='https://consent.youtube.com/save']",
);
if (consentForm) {
await consentForm.click('button');
}
const title = await window.title();
expect(title.replace(/\s/g, " ")).toEqual("YouTube Music");
const title = await window.title();
expect(title.replaceAll(/\s/g, ' ')).toEqual('YouTube Music');
const url = window.url();
expect(url.startsWith("https://music.youtube.com")).toBe(true);
const url = window.url();
expect(url.startsWith('https://music.youtube.com')).toBe(true);
await app.close();
await app.close();
});