- Notifications
You must be signed in to change notification settings - Fork 136
/
Copy pathplaywright.config.ts
27 lines (24 loc) · 777 Bytes
/
playwright.config.ts
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{typePlaywrightTestConfig,devices}from'@playwright/test'
importfsfrom'fs-extra'
consttempDir=fileURLToPath(newURL('playground-temp',import.meta.url))
fs.ensureDirSync(tempDir)
fs.emptyDirSync(tempDir)
fs.copySync(fileURLToPath(newURL('playground',import.meta.url)),tempDir,{
filter: (src)=>{
src=src.replaceAll('\\','/')
return(
!src.includes('/__tests__')&&
!src.includes('/.vite')&&
!src.includes('/dist')
)
},
})
constconfig: PlaywrightTestConfig={
forbidOnly: !!process.env['CI'],
workers: 1,
timeout: 10_000,
reporter: process.env['CI'] ? 'github' : 'list',
projects: [{name: 'chromium',use: devices['Desktop Chrome']}],
}
exportdefaultconfig