-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.js
More file actions
38 lines (36 loc) · 862 Bytes
/
playwright.config.js
File metadata and controls
38 lines (36 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { defineConfig } from "@playwright/test";
const PORT = Number(process.env.PORT) || 4000;
const useExternalServer = process.env.PLAYWRIGHT_EXTERNAL_SERVER === "1";
export default defineConfig({
testDir: ".",
timeout: 30_000,
retries: 0,
workers: 1,
reporter: [["list"], ["html", { open: "never" }]],
use: {
headless: true,
},
projects: [
{
name: "unit",
testMatch: "app/**/*.spec.js",
},
{
name: "e2e",
testMatch: "app/**/*.test.js",
use: {
baseURL: `http://localhost:${PORT}`,
},
...(useExternalServer
? {}
: {
webServer: {
command: `make serve OPEN_BROWSER=0 PORT=${PORT}`,
port: PORT,
reuseExistingServer: !process.env.CI,
timeout: 30_000,
},
}),
},
],
});