playwright.config.js 634 B

123456789101112131415161718192021222324
  1. import { fileURLToPath } from "node:url"
  2. import { defineConfig, devices } from "@playwright/test"
  3. const devicesToTest = ["Desktop Chrome"]
  4. export default defineConfig({
  5. testDir: "./test/e2e",
  6. /* Run tests in files in parallel */
  7. fullyParallel: true,
  8. retries: 0,
  9. workers: undefined,
  10. timeout: undefined,
  11. /* Reporter to use. See https://playwright.dev/docs/test-reporters */
  12. reporter: "html",
  13. use: {
  14. trace: "on-first-retry",
  15. nuxt: {
  16. rootDir: fileURLToPath(new URL(".", import.meta.url))
  17. }
  18. },
  19. projects: devicesToTest.map((p) =>
  20. typeof p === "string" ? { name: p, use: devices[p] } : p
  21. )
  22. })