Skip to content

Commit 299dcec

Browse files
committed
fix(browser): resolve thread count from maxWorkers
1 parent 8fe641b commit 299dcec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/browser/src/node/pool.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ export function createBrowserPool(vitest: Vitest): ProcessPool {
155155
return 1
156156
}
157157

158+
if (project.config.maxWorkers) {
159+
return project.config.maxWorkers
160+
}
161+
158162
return vitest.config.watch
159163
? Math.max(Math.floor(numCpus / 2), 1)
160164
: Math.max(numCpus - 1, 1)

0 commit comments

Comments
 (0)