daedalOS/playwright.config.ts
2023-07-19 00:09:29 -07:00

39 lines
789 B
TypeScript

import type { PlaywrightTestConfig } from "@playwright/test";
import { devices } from "@playwright/test";
const PORT = process.env.PORT || 3000;
const baseURL = `http://localhost:${PORT}`;
const config: PlaywrightTestConfig = {
fullyParallel: true,
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
{
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},
{
name: "webkit",
use: { ...devices["Desktop Safari"] },
},
],
reporter: process.env.CI ? "dot" : [["html", { open: "always" }]],
testDir: "e2e",
use: {
baseURL,
},
webServer: {
command: "yarn dev",
url: baseURL,
},
workers: process.env.CI ? 1 : undefined,
};
// ts-prune-ignore-next
export default config;