2025-12-17 19:26:42 +00:00
|
|
|
import { puppeteerLauncher } from "@web/test-runner-puppeteer";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
nodeResolve: true,
|
|
|
|
|
files: ["test/**/*.test.js"],
|
|
|
|
|
coverage: true,
|
|
|
|
|
browsers: [
|
|
|
|
|
puppeteerLauncher({
|
|
|
|
|
launchOptions: {
|
2025-12-19 05:19:22 +00:00
|
|
|
// 'new' is the modern headless mode that supports more features
|
2025-12-17 19:26:42 +00:00
|
|
|
headless: "new",
|
|
|
|
|
args: [
|
|
|
|
|
"--no-sandbox",
|
|
|
|
|
"--disable-setuid-sandbox",
|
2025-12-19 05:19:22 +00:00
|
|
|
|
|
|
|
|
// Force GPU and WebGL using ANGLE + SwiftShader (CPU)
|
|
|
|
|
// This combination is often more reliable in CI/Headless than --use-gl=swiftshader alone
|
|
|
|
|
"--use-gl=angle",
|
|
|
|
|
"--use-angle=swiftshader",
|
|
|
|
|
"--enable-webgl",
|
|
|
|
|
"--ignore-gpu-blocklist",
|
|
|
|
|
|
|
|
|
|
// Performance / Stability flags
|
2025-12-17 19:26:42 +00:00
|
|
|
"--no-first-run",
|
|
|
|
|
"--disable-extensions",
|
2025-12-19 05:19:22 +00:00
|
|
|
"--disable-dev-shm-usage", // Prevent shared memory crashes in Docker/CI
|
|
|
|
|
"--mute-audio",
|
2025-12-17 19:26:42 +00:00
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
testFramework: {
|
|
|
|
|
config: {
|
|
|
|
|
ui: "bdd",
|
|
|
|
|
// WebGL initialization in software mode can be slow, so we bump the timeout
|
2025-12-19 05:19:22 +00:00
|
|
|
timeout: "20000",
|
2025-12-17 19:26:42 +00:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|