File tree 3 files changed +218
-43
lines changed
3 files changed +218
-43
lines changed Original file line number Diff line number Diff line change 17
17
},
18
18
"devDependencies" : {
19
19
"@nuxt/test-utils" : " latest" ,
20
- "@playwright/test" : " 1.47.1"
20
+ "@playwright/test" : " 1.47.1" ,
21
+ "std-env" : " ^3.7.0"
21
22
}
22
23
}
Original file line number Diff line number Diff line change 1
1
import { fileURLToPath } from 'node:url'
2
2
import { defineConfig , devices } from '@playwright/test'
3
3
import type { ConfigOptions } from '@nuxt/test-utils/playwright'
4
+ import { isCI , isWindows } from 'std-env'
4
5
5
6
const devicesToTest = [
6
7
'Desktop Chrome' ,
@@ -21,11 +22,12 @@ export default defineConfig<ConfigOptions>({
21
22
/* Run tests in files in parallel */
22
23
fullyParallel : true ,
23
24
/* Fail the build on CI if you accidentally left test.only in the source code. */
24
- forbidOnly : ! ! process . env . CI ,
25
+ forbidOnly : ! ! isCI ,
25
26
/* Retry on CI only */
26
- retries : process . env . CI ? 2 : 0 ,
27
+ retries : isCI ? 2 : 0 ,
27
28
/* Opt out of parallel tests on CI. */
28
- workers : process . env . CI ? 1 : undefined ,
29
+ workers : isCI ? 1 : undefined ,
30
+ timeout : isWindows ? 60000 : undefined ,
29
31
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
30
32
reporter : 'html' ,
31
33
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
You can’t perform that action at this time.
0 commit comments