Files
nodeMap/playwright.config.js
2025-09-16 13:47:11 +02:00

36 lines
1003 B
JavaScript

// Playwright test configuration for the NodeMap project
// Starts the local Next.js custom server (server.js) and runs tests against http://localhost:3000
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { defineConfig, devices } = require("@playwright/test");
module.exports = defineConfig({
testDir: "./playwright/tests",
timeout: 60_000,
expect: { timeout: 10_000 },
fullyParallel: true,
retries: process.env.CI ? 2 : 0,
// Keep console-friendly reporter only; no JUnit output since it's not used currently
reporter: [["list"]],
use: {
baseURL: "http://localhost:3000",
// Disable artifact generation locally to avoid creating files
trace: "off",
video: "off",
screenshot: "off",
headless: true,
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
webServer: {
command: "node server.js",
port: 3000,
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
});