Fix: Force random port for Chrome to resolve concurrency issues

This commit is contained in:
2025-12-28 00:35:19 +11:00
parent 5ae3b0d036
commit f757106f89

View File

@@ -27,7 +27,8 @@ async function runTest(url, options = {}) {
const chromePath = process.platform === 'linux' ? '/usr/bin/chromium' : undefined;
const chrome = await chromeLauncher.launch({
chromeFlags: ['--headless', '--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'],
chromePath: chromePath
chromePath: chromePath,
port: 0 // Force random port to avoid concurrency issues with default 9222
});
// Lighthouse Config