File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1+ import * as os from "node:os" ;
2+
13import type { PlaywrightTestConfig } from "@playwright/test" ;
24import { devices } from "@playwright/test" ;
35
@@ -7,6 +9,8 @@ process.env.NODE_OPTIONS =
79 ( process . env . NODE_OPTIONS ?? "" ) + ` --no-warnings=ExperimentalWarning` ;
810
911const isWindows = process . platform === "win32" ;
12+ let workers = Math . floor ( os . cpus ( ) . length / 2 ) ;
13+ if ( workers < 2 ) workers = 2 ;
1014
1115const config : PlaywrightTestConfig = {
1216 testDir : "." ,
@@ -18,8 +22,8 @@ const config: PlaywrightTestConfig = {
1822 } ,
1923 /* Maximum time one test can run for. */
2024 timeout : isWindows ? 60_000 : 30_000 ,
21- fullyParallel : ! ( isWindows && process . env . CI ) ,
22- workers : isWindows && process . env . CI ? 1 : undefined ,
25+ fullyParallel : true ,
26+ workers,
2327 expect : {
2428 /* Maximum time expect() should wait for the condition to be met. */
2529 timeout : isWindows ? 10_000 : 5_000 ,
You can’t perform that action at this time.
0 commit comments