Fix lint errors

This commit is contained in:
beatz174-bit
2025-12-02 17:22:09 +10:00
parent f6edda1c42
commit 9822cad8eb
24 changed files with 171 additions and 181 deletions
+6 -8
View File
@@ -7,17 +7,15 @@ const coverageDir = path.join(process.cwd(), 'coverage-reports', 'e2e', '.nyc_ou
async function writeCoverageFile(page: Page, testInfo: TestInfo) {
try {
const coverage = await page.evaluate(() => (globalThis as any).__coverage__ ?? null);
const coverage = await page.evaluate(
() => (globalThis as { __coverage__?: unknown }).__coverage__ ?? null,
);
if (!coverage || Object.keys(coverage).length === 0) return;
await fs.mkdir(coverageDir, { recursive: true });
const titleParts =
typeof testInfo.titlePath === 'function'
? testInfo.titlePath()
: Array.isArray((testInfo as any).titlePath)
? (testInfo as any).titlePath
: [testInfo.title];
typeof testInfo.titlePath === 'function' ? testInfo.titlePath() : [testInfo.title];
const safeTitle = titleParts
.filter(Boolean)
.map((part) => part.replace(/[^a-zA-Z0-9-_]+/g, '_'))
@@ -35,8 +33,8 @@ async function writeCoverageFile(page: Page, testInfo: TestInfo) {
}
export const test = base.extend({
page: async ({ page }, use, testInfo) => {
await use(page);
page: async ({ page }, applyPageFixture, testInfo) => {
await applyPageFixture(page);
await writeCoverageFile(page, testInfo);
},
});
+1 -1
View File
@@ -1,4 +1,4 @@
import { expect, test, Page } from './fixtures';
import { expect, test } from './fixtures';
import {
areaName,