-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.mjs
More file actions
32 lines (29 loc) · 991 Bytes
/
Copy pathplaywright.config.mjs
File metadata and controls
32 lines (29 loc) · 991 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
// Playwright configuration for Lorekeeper.
//
// Serves web/ over http on 127.0.0.1 (tests/serve.mjs adds the
// Origin-Agent-Cluster: ?1 header) and launches Chromium with the WebMCP
// feature enabled so document.modelContext exists for the tool tests.
import { defineConfig } from "@playwright/test";
// Override with LOREKEEPER_TEST_PORT so parallel workers and a local
// preview server on the default port do not clash.
const PORT = Number(process.env.LOREKEEPER_TEST_PORT) || 4173;
export default defineConfig({
testDir: "./tests",
testMatch: "**/*.spec.mjs",
timeout: 120_000,
expect: { timeout: 60_000 },
fullyParallel: false,
workers: 1,
reporter: [["list"]],
use: {
baseURL: `http://127.0.0.1:${PORT}`,
browserName: "chromium",
launchOptions: { args: ["--enable-features=WebMCP"] },
},
webServer: {
command: `node tests/serve.mjs ${PORT}`,
url: `http://127.0.0.1:${PORT}/`,
reuseExistingServer: false,
timeout: 30_000,
},
});