-
-
Notifications
You must be signed in to change notification settings - Fork 238
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
27 lines (24 loc) · 777 Bytes
/
playwright.config.ts
File metadata and controls
27 lines (24 loc) · 777 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
import { fileURLToPath } from 'node:url'
import { type PlaywrightTestConfig, devices } from '@playwright/test'
import fs from 'fs-extra'
const tempDir = fileURLToPath(new URL('playground-temp', import.meta.url))
fs.ensureDirSync(tempDir)
fs.emptyDirSync(tempDir)
fs.copySync(fileURLToPath(new URL('playground', import.meta.url)), tempDir, {
filter: (src) => {
src = src.replaceAll('\\', '/')
return (
!src.includes('/__tests__') &&
!src.includes('/.vite') &&
!src.includes('/dist')
)
},
})
const config: PlaywrightTestConfig = {
forbidOnly: !!process.env['CI'],
workers: 1,
timeout: 10_000,
reporter: process.env['CI'] ? 'github' : 'list',
projects: [{ name: 'chromium', use: devices['Desktop Chrome'] }],
}
export default config