mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-10-27 07:52:03 +00:00
- Added `torch-lock` dependency to `torch/package.json` - Initialized TORCH structure using `cmdInit` (mocked interaction) - Updated `torch/package.json` with TORCH CLI scripts (`lock:check`, `lock:lock`, etc.) - Updated `torch/torch-config.json` with Nostr configuration - Added `type: module` to `torch/package.json` to support ES modules - Cleaned up extraneous directories (`test_logs`, `todo`, etc.) from initialization Co-authored-by: PR0M3TH3AN <[email protected]>
50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
import { chromium } from '@playwright/test';
|
|
|
|
(async () => {
|
|
const browser = await chromium.launch();
|
|
const page = await browser.newPage();
|
|
|
|
let errorCount = 0;
|
|
|
|
page.on('console', msg => {
|
|
const type = msg.type();
|
|
if (type === 'error' || type === 'warning') {
|
|
console.log(`CONSOLE [${type.toUpperCase()}]: ${msg.text()}`);
|
|
if (type === 'error') errorCount++;
|
|
}
|
|
});
|
|
|
|
page.on('pageerror', exception => {
|
|
console.log(`PAGE ERROR: ${exception}`);
|
|
errorCount++;
|
|
});
|
|
|
|
page.on('requestfailed', request => {
|
|
// Check if failure() is not null before accessing errorText
|
|
const failure = request.failure();
|
|
const errorText = failure ? failure.errorText : 'Unknown error';
|
|
console.log(`REQUEST FAILED: ${request.url()} - ${errorText}`);
|
|
errorCount++;
|
|
});
|
|
|
|
try {
|
|
console.log('Navigating to http://localhost:4173/dashboard/ ...');
|
|
await page.goto('http://localhost:4173/dashboard/');
|
|
console.log('Page loaded. Waiting 5s for any async errors...');
|
|
await page.waitForTimeout(5000);
|
|
} catch (e) {
|
|
console.error('Navigation failed:', e);
|
|
errorCount++;
|
|
}
|
|
|
|
await browser.close();
|
|
|
|
if (errorCount > 0) {
|
|
console.log(`\nFound ${errorCount} errors.`);
|
|
process.exit(1);
|
|
} else {
|
|
console.log('\nNo errors found.');
|
|
process.exit(0);
|
|
}
|
|
})();
|