Skip to content

Commit 4aa229e

Browse files
fix(tests): add CI-compatible Chromium launch args to prevent crashes
1 parent ebad664 commit 4aa229e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/e2e/helpers/global-setup.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,18 @@ let page;
2929
*/
3030
async function ensureContext () {
3131
if (!browser) {
32-
browser = await chromium.launch({ headless: true });
32+
// Additional args for CI stability to prevent crashes
33+
const launchOptions = {
34+
headless: true,
35+
args: [
36+
"--disable-dev-shm-usage", // Overcome limited resource problems in Docker/CI
37+
"--disable-gpu", // Disable GPU hardware acceleration
38+
"--no-sandbox", // Required for running as root in some CI environments
39+
"--disable-setuid-sandbox",
40+
"--single-process" // Run in single process mode for better stability in CI
41+
]
42+
};
43+
browser = await chromium.launch(launchOptions);
3344
}
3445
if (!context) {
3546
context = await browser.newContext();

0 commit comments

Comments
 (0)