playwright.config.ts 539 B

123456789101112131415161718
  1. import { defineConfig } from "@playwright/test";
  2. const testPort = Number(process.env.MOBILE_RUNTIME_TEST_PORT ?? 4174);
  3. export default defineConfig({
  4. testDir: "./tests",
  5. testMatch: "**/*.spec.ts",
  6. timeout: 20_000,
  7. use: {
  8. baseURL: `http://127.0.0.1:${testPort}`,
  9. viewport: { width: 1100, height: 1100 },
  10. },
  11. webServer: {
  12. command: `npm run dev -- --port ${testPort}`,
  13. url: `http://127.0.0.1:${testPort}/tests/runtime-fixture.html`,
  14. reuseExistingServer: process.env.MOBILE_RUNTIME_TEST_PORT == null,
  15. },
  16. });