playwright.config.ts

808 B · raw

1import { defineConfig } from "@playwright/test";2import { fileURLToPath } from "url";3import { dirname, join } from "path";45const __filename = fileURLToPath(import.meta.url);6const __dirname = dirname(__filename);7const EXTENSION_PATH = join(__dirname, "dist");89export default defineConfig({10  testDir: "./tests",11  timeout: 30_000,12  use: {13    headless: false,14    viewport: { width: 320, height: 600 },15  },16  projects: [17    {18      name: "peach-extension",19      use: {20        launchOptions: {21          args: [22            `--disable-extensions-except=${EXTENSION_PATH}`,23            `--load-extension=${EXTENSION_PATH}`,24            `--no-sandbox`,25            `--disable-gpu`,26            `--disable-dev-shm-usage`,27          ],28        },29      },30      testMatch: "**/*.spec.ts",31    },32  ],33});