Repository navigation
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
59 lines (56 loc) · 1.62 KB
/
Copy pathplaywright.config.ts
File metadata and controls
59 lines (56 loc) · 1.62 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { dirname, resolve } from "node:path"
import { fileURLToPath } from "node:url"
import { defineConfig } from "@playwright/test"
const root = dirname(fileURLToPath(import.meta.url))
const externalManifest = process.env.IMMORTAL_DEMO_MANIFEST
const externalFundedManifest = process.env.IMMORTAL_FUNDED_DEMO_MANIFEST
export default defineConfig({
testDir: "tests/browser",
testIgnore: "funded-regtest-real.spec.ts",
timeout: 60_000,
expect: { timeout: 10_000 },
fullyParallel: false,
workers: 1,
use: {
baseURL: "http://127.0.0.1:3102",
channel: "chrome",
trace: "retain-on-failure",
},
webServer: [
...(externalFundedManifest
? []
: [
{
command: "node tests/support/fake-funded-adapter.mjs",
url: "http://127.0.0.1:18183/health",
reuseExistingServer: false,
timeout: 15_000,
},
]),
...(externalManifest
? []
: [
{
command: "node tests/support/fake-immortal-relay.mjs",
url: "http://127.0.0.1:18182/health",
reuseExistingServer: false,
timeout: 15_000,
},
]),
{
command: "pnpm dev --hostname 127.0.0.1 --port 3102",
url: "http://127.0.0.1:3102",
reuseExistingServer: false,
timeout: 60_000,
env: {
...process.env,
IMMORTAL_DEMO_MANIFEST:
externalManifest ??
resolve(root, "tests/fixtures/no-spend-manifest.json"),
IMMORTAL_FUNDED_DEMO_MANIFEST:
externalFundedManifest ??
resolve(root, "tmp/funded-test-launch.json"),
},
},
],
})