-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
39 lines (34 loc) · 1.22 KB
/
Copy pathplaywright.config.ts
File metadata and controls
39 lines (34 loc) · 1.22 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
import { defineConfig, devices } from '@playwright/test';
const PORT = 4322;
const BASE_URL = `http://127.0.0.1:${PORT}/no-ai/`;
/**
* End-to-end checks run against the BUILT static site, not the dev server.
*
* Everything this library claims depends on things jsdom cannot do — jsdom has
* no FontFace, so every unit test necessarily runs the fail-open path and can
* never observe the forged font at all. These tests are the only place the
* central claim is actually verified.
*
* Run `npm run build:pages` first; the web server serves whatever is in dist.
*/
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
reporter: process.env.CI ? [['github'], ['list']] : [['list']],
use: {
baseURL: BASE_URL,
trace: 'on-first-retry',
},
// Chromium only. The technique needs the FontFace API and canvas glyph
// rasterisation; broadening browsers is a separate decision with its own
// fallout, not a freebie.
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
webServer: {
command: 'node e2e/serve-static.mjs',
url: BASE_URL,
reuseExistingServer: !process.env.CI,
timeout: 30_000,
},
});