fix(test): resolve TypeScript errors in test files
- Fix unused parameter warning in global-setup.ts - Fix unknown error type in error handling - Fix unused variable in test-runner.ts All tests now compile without TypeScript errors. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import { chromium, FullConfig } from '@playwright/test';
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
async function globalSetup(config: FullConfig) {
|
async function globalSetup(_config: FullConfig) {
|
||||||
// Ensure screenshots directory exists
|
// Ensure screenshots directory exists
|
||||||
const screenshotsDir = path.join(process.cwd(), 'screenshots');
|
const screenshotsDir = path.join(process.cwd(), 'screenshots');
|
||||||
if (!fs.existsSync(screenshotsDir)) {
|
if (!fs.existsSync(screenshotsDir)) {
|
||||||
@@ -26,7 +26,7 @@ async function globalSetup(config: FullConfig) {
|
|||||||
await page.goto('http://localhost:5173', { waitUntil: 'networkidle' });
|
await page.goto('http://localhost:5173', { waitUntil: 'networkidle' });
|
||||||
console.log('✅ Application pre-warmed successfully');
|
console.log('✅ Application pre-warmed successfully');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn('⚠️ Could not pre-warm application:', error.message);
|
console.warn('⚠️ Could not pre-warm application:', (error as Error).message);
|
||||||
} finally {
|
} finally {
|
||||||
await context.close();
|
await context.close();
|
||||||
await browser.close();
|
await browser.close();
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ class TestRunner {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const command = `npx playwright test tests/${suite.file} ${playwrightOptions}`;
|
const command = `npx playwright test tests/${suite.file} ${playwrightOptions}`;
|
||||||
const { stdout, stderr } = await execAsync(command);
|
const { stdout } = await execAsync(command);
|
||||||
|
|
||||||
this.results[suite.name] = {
|
this.results[suite.name] = {
|
||||||
success: true,
|
success: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user