forked from 21gifts/api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
44 lines (43 loc) · 1.25 KB
/
Copy pathplaywright.config.ts
File metadata and controls
44 lines (43 loc) · 1.25 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
import { defineConfig } from '@playwright/test';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
/**
* HTTP end-to-end tests against `bun src/index.ts` (request-only; no browser).
* Docker runs the compiled `dist/index.js`; locally and in CI this boots source.
*/
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: !!process.env['CI'],
reporter: 'list',
use: {
baseURL: 'http://127.0.0.1:3000',
},
webServer: {
command: 'bun src/index.ts',
url: 'http://127.0.0.1:3000/healthz',
reuseExistingServer: !process.env['CI'],
timeout: 60_000,
env: {
...process.env,
BIND_ADDR: '127.0.0.1:3000',
PUBLIC_BASE_URL: 'http://127.0.0.1:3000',
DATABASE_URL: '',
NOSTR_NSEC_KEK: '',
NOSTR_PUBLISH: '',
NOSTR_PUBLISH_PUBLIC: '',
NOSTR_RELAY_URL: '',
NOSTR_RELAY_SPACE: '',
NOSTR_RELAY_PUBLIC: '',
SPEND_API_TOKEN: '',
VAPID_PUBLIC_KEY: '',
VAPID_PRIVATE_KEY: '',
VAPID_SUBJECT: '',
DEBUG_TOKEN: 'e2e-debug-token',
NIP57_PROBE: '0',
WEBAUTHN_RP_ID: 'localhost',
CORS_ALLOWED_ORIGINS: 'http://localhost:3000,http://127.0.0.1:3000',
MEDIA_DIR: join(tmpdir(), '21gifts-e2e-media'),
},
},
});