[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

perf!: remove `minWorkers` and set it automatically to 0 in non watch mode (#8454)

authored by

Vladimir and committed by
GitHub
(Aug 25, 2025, 4:16 PM +0200) 2c2d1d4c db6cd73b

+44 -178
+1 -35
docs/config/index.md
··· 750 750 751 751 Maximum number or percentage of threads. You can also use `VITEST_MAX_THREADS` environment variable. 752 752 753 - ##### poolOptions.threads.minThreads<NonProjectOption /> 754 - 755 - - **Type:** `number | string` 756 - - **Default:** _available CPUs_ 757 - 758 - Minimum number or percentage of threads. You can also use `VITEST_MIN_THREADS` environment variable. 759 - 760 753 ##### poolOptions.threads.singleThread 761 754 762 755 - **Type:** `boolean` ··· 822 815 823 816 Maximum number or percentage of forks. You can also use `VITEST_MAX_FORKS` environment variable. 824 817 825 - ##### poolOptions.forks.minForks<NonProjectOption /> 826 - 827 - - **Type:** `number | string` 828 - - **Default:** _available CPUs_ 829 - 830 - Minimum number or percentage of forks. You can also use `VITEST_MIN_FORKS` environment variable. 831 - 832 818 ##### poolOptions.forks.isolate 833 819 834 820 - **Type:** `boolean` ··· 884 870 - **Default:** _available CPUs_ 885 871 886 872 Maximum number or percentage of threads. You can also use `VITEST_MAX_THREADS` environment variable. 887 - 888 - ##### poolOptions.vmThreads.minThreads<NonProjectOption /> 889 - 890 - - **Type:** `number | string` 891 - - **Default:** _available CPUs_ 892 - 893 - Minimum number or percentage of threads. You can also use `VITEST_MIN_THREADS` environment variable. 894 873 895 874 ##### poolOptions.vmThreads.memoryLimit<NonProjectOption /> 896 875 ··· 966 945 967 946 Maximum number or percentage of forks. You can also use `VITEST_MAX_FORKS` environment variable. 968 947 969 - ##### poolOptions.vmForks.minForks<NonProjectOption /> 970 - 971 - - **Type:** `number | string` 972 - - **Default:** _available CPUs_ 973 - 974 - Minimum number or percentage of forks. You can also use `VITEST_MIN_FORKS` environment variable. 975 - 976 948 ##### poolOptions.vmForks.memoryLimit<NonProjectOption /> 977 949 978 950 - **Type:** `string | number` ··· 997 969 - **Default:** `true` 998 970 - **CLI:** `--no-file-parallelism`, `--fileParallelism=false` 999 971 1000 - Should all test files run in parallel. Setting this to `false` will override `maxWorkers` and `minWorkers` options to `1`. 972 + Should all test files run in parallel. Setting this to `false` will override `maxWorkers` option to `1`. 1001 973 1002 974 ::: tip 1003 975 This option doesn't affect tests running in the same file. If you want to run those in parallel, use `concurrent` option on [describe](/api/#describe-concurrent) or via [a config](#sequence-concurrent). ··· 1008 980 - **Type:** `number | string` 1009 981 1010 982 Maximum number or percentage of workers to run tests in. `poolOptions.{threads,vmThreads}.maxThreads`/`poolOptions.forks.maxForks` has higher priority. 1011 - 1012 - ### minWorkers<NonProjectOption /> {#minworkers} 1013 - 1014 - - **Type:** `number | string` 1015 - 1016 - Minimum number or percentage of workers to run tests in. `poolOptions.{threads,vmThreads}.minThreads`/`poolOptions.forks.minForks` has higher priority. 1017 983 1018 984 ### testTimeout 1019 985
-35
docs/guide/cli-generated.md
··· 411 411 412 412 Maximum number or percentage of threads to run tests in 413 413 414 - ### poolOptions.threads.minThreads 415 - 416 - - **CLI:** `--poolOptions.threads.minThreads <workers>` 417 - - **Config:** [poolOptions.threads.minThreads](/config/#pooloptions-threads-minthreads) 418 - 419 - Minimum number or percentage of threads to run tests in 420 - 421 414 ### poolOptions.threads.useAtomics 422 415 423 416 - **CLI:** `--poolOptions.threads.useAtomics` ··· 445 438 - **Config:** [poolOptions.vmThreads.maxThreads](/config/#pooloptions-vmthreads-maxthreads) 446 439 447 440 Maximum number or percentage of threads to run tests in 448 - 449 - ### poolOptions.vmThreads.minThreads 450 - 451 - - **CLI:** `--poolOptions.vmThreads.minThreads <workers>` 452 - - **Config:** [poolOptions.vmThreads.minThreads](/config/#pooloptions-vmthreads-minthreads) 453 - 454 - Minimum number or percentage of threads to run tests in 455 441 456 442 ### poolOptions.vmThreads.useAtomics 457 443 ··· 488 474 489 475 Maximum number or percentage of processes to run tests in 490 476 491 - ### poolOptions.forks.minForks 492 - 493 - - **CLI:** `--poolOptions.forks.minForks <workers>` 494 - - **Config:** [poolOptions.forks.minForks](/config/#pooloptions-forks-minforks) 495 - 496 - Minimum number or percentage of processes to run tests in 497 - 498 477 ### poolOptions.vmForks.isolate 499 478 500 479 - **CLI:** `--poolOptions.vmForks.isolate` ··· 516 495 517 496 Maximum number or percentage of processes to run tests in 518 497 519 - ### poolOptions.vmForks.minForks 520 - 521 - - **CLI:** `--poolOptions.vmForks.minForks <workers>` 522 - - **Config:** [poolOptions.vmForks.minForks](/config/#pooloptions-vmforks-minforks) 523 - 524 - Minimum number or percentage of processes to run tests in 525 - 526 498 ### poolOptions.vmForks.memoryLimit 527 499 528 500 - **CLI:** `--poolOptions.vmForks.memoryLimit <limit>` ··· 543 515 - **Config:** [maxWorkers](/config/#maxworkers) 544 516 545 517 Maximum number or percentage of workers to run tests in 546 - 547 - ### minWorkers 548 - 549 - - **CLI:** `--minWorkers <workers>` 550 - - **Config:** [minWorkers](/config/#minworkers) 551 - 552 - Minimum number or percentage of workers to run tests in 553 518 554 519 ### environment 555 520
+1
docs/guide/migration.md
··· 238 238 - Reporter APIs `onCollected`, `onSpecsCollected`, `onPathsCollected`, `onTaskUpdate` and `onFinished`. See [`Reporters API`](/advanced/api/reporters) for new alternatives. These APIs were introduced in Vitest `v3.0.0`. 239 239 - `deps.external`, `deps.inline`, `deps.fallbackCJS` config options. Use `server.deps.external`, `server.deps.inline`, or `server.deps.fallbackCJS` instead. 240 240 - `browser.testerScripts` config option. Use [`browser.testerHtmlPath`](/guide/browser/config#browser-testerhtmlpath) instead. 241 + - `minWorkers` config option. Only `maxWorkers` has any effect on how tests are running, so we are removing this public option. 241 242 242 243 This release also removes all deprecated types. This finally fixes an issue where Vitest accidentally pulled in `@types/node` (see [#5481](https://github.com/vitest-dev/vitest/issues/5481) and [#6141](https://github.com/vitest-dev/vitest/issues/6141)). 243 244
+1 -1
docs/guide/parallelism.md
··· 12 12 - `forks` (the default) and `vmForks` run tests in different [child processes](https://nodejs.org/api/child_process.html) 13 13 - `threads` and `vmThreads` run tests in different [worker threads](https://nodejs.org/api/worker_threads.html) 14 14 15 - Both "child processes" and "worker threads" are refered to as "workers". You can configure the number of running workers with [`minWorkers`](/config/#minworkers) and [`maxWorkers`](/config/#maxworkers) options. Or more granually with [`poolOptions`](/config/#pooloptions) configuration. 15 + Both "child processes" and "worker threads" are refered to as "workers". You can configure the number of running workers with [`maxWorkers`](/config/#maxworkers) option. Or more granually with [`poolOptions`](/config/#pooloptions) configuration. 16 16 17 17 If you have a lot of tests, it is usually faster to run them in parallel, but it also depends on the project, the environment and [isolation](/config/#isolate) state. To disable file parallelisation, you can set [`fileParallelism`](/config/#fileparallelism) to `false`. To learn more about possible performance improvements, read the [Performance Guide](/guide/improving-performance). 18 18
-2
test/test-utils/index.ts
··· 79 79 ctx = await startVitest(mode, cliFilters, { 80 80 // Test cases are already run with multiple forks/threads 81 81 maxWorkers: 1, 82 - minWorkers: 1, 83 82 84 83 watch: false, 85 84 // "none" can be used to disable passing "reporter" option so that default value is used (it's not same as reporters: ["default"]) ··· 164 163 165 164 if (command === 'vitest') { 166 165 args.push('--maxWorkers=1') 167 - args.push('--minWorkers=1') 168 166 } 169 167 170 168 const subprocess = x(command, args, options as Options).process!
-3
test/cli/test/scoped-fixtures.test.ts
··· 253 253 }, { 254 254 globals: true, 255 255 maxWorkers: 1, 256 - minWorkers: 1, 257 256 pool: 'vmThreads', 258 257 }) 259 258 ··· 291 290 globals: true, 292 291 isolate: false, 293 292 maxWorkers: 2, 294 - minWorkers: 2, 295 293 pool: 'threads', 296 294 }) 297 295 ··· 329 327 globals: true, 330 328 isolate: false, 331 329 maxWorkers: 1, 332 - minWorkers: 1, 333 330 pool: 'threads', 334 331 }) 335 332
-21
test/config/test/failures.test.ts
··· 1 1 import type { UserConfig as ViteUserConfig } from 'vite' 2 2 import type { TestUserConfig } from 'vitest/node' 3 3 import type { VitestRunnerCLIOptions } from '../../test-utils' 4 - import { cpus } from 'node:os' 5 4 import { normalize, resolve } from 'pathe' 6 5 import { beforeEach, expect, test } from 'vitest' 7 6 import { version } from 'vitest/package.json' ··· 575 574 test('non existing project name array will throw', async () => { 576 575 const { stderr } = await runVitest({ project: ['non-existing-project', 'also-non-existing'] }) 577 576 expect(stderr).toMatch('No projects matched the filter "non-existing-project", "also-non-existing".') 578 - }) 579 - 580 - test('minWorkers must be smaller than maxWorkers', async () => { 581 - const { stderr } = await runVitest({ minWorkers: 2, maxWorkers: 1 }) 582 - 583 - expect(stderr).toMatch('RangeError: options.minThreads and options.maxThreads must not conflict') 584 - }) 585 - 586 - test('minWorkers higher than maxWorkers does not crash', async ({ skip }) => { 587 - skip(cpus().length < 2, 'Test requires +2 CPUs') 588 - 589 - const { stdout, stderr } = await runVitest({ 590 - maxWorkers: 1, 591 - 592 - // Overrides defaults of "runVitest" of "test-utils" 593 - minWorkers: undefined, 594 - }) 595 - 596 - expect(stdout).toMatch('✓ example.test.ts > it works') 597 - expect(stderr).toBe('') 598 577 }) 599 578 600 579 test('cannot set the `workspace` options', async () => {
+1 -1
test/config/test/get-state.test.ts
··· 4 4 5 5 test.for([ 6 6 { isolate: true }, 7 - { isolate: false, minWorkers: 1, maxWorkers: 1 }, 7 + { isolate: false, maxWorkers: 1 }, 8 8 { isolate: false, fileParallelism: false }, 9 9 { isolate: false, poolOptions: { forks: { singleFork: true } } }, 10 10 ] satisfies TestUserConfig[])(`getState().testPath during collection %s`, async (config) => {
+1 -1
test/config/test/mixed-environments.test.ts
··· 6 6 const configs: TestUserConfig[] = [ 7 7 { pool: 'threads', poolOptions: { threads: { isolate: false, singleThread: true } } }, 8 8 { pool: 'threads', poolOptions: { threads: { isolate: false, singleThread: false } } }, 9 - { pool: 'threads', poolOptions: { threads: { isolate: false, minThreads: 1, maxThreads: 1 } } }, 9 + { pool: 'threads', poolOptions: { threads: { isolate: false, maxThreads: 1 } } }, 10 10 { pool: 'forks', poolOptions: { forks: { isolate: true } } }, 11 11 { pool: 'forks', poolOptions: { forks: { isolate: false } } }, 12 12 ]
+3 -3
test/config/test/workers-option.test.ts
··· 31 31 } 32 32 33 33 test('workers percent argument should not throw error', async () => { 34 - const { stderr } = await runVitest({ maxWorkers: '100%', minWorkers: '10%' }) 34 + const { stderr } = await runVitest({ maxWorkers: '100%' }) 35 35 36 36 expect(stderr).toBe('') 37 37 }) ··· 45 45 let workerOptions = {} 46 46 47 47 if (poolOption.toLowerCase().includes('threads')) { 48 - workerOptions = { maxThreads: '100%', minThreads: '10%' } 48 + workerOptions = { maxThreads: '100%' } 49 49 } 50 50 51 51 if (poolOption.toLowerCase().includes('forks')) { 52 - workerOptions = { maxForks: '100%', minForks: '10%' } 52 + workerOptions = { maxForks: '100%' } 53 53 } 54 54 55 55 const { stderr } = await runVitest({ poolOptions: { [poolOption]: workerOptions } })
+10 -2
test/core/test/web-worker-node.test.ts
··· 222 222 223 223 function sendEventMessage(worker: SharedWorker, msg: any) { 224 224 worker.port.postMessage(msg) 225 - return new Promise<string>((resolve) => { 225 + return new Promise<string>((resolve, reject) => { 226 + const timeout = setTimeout(() => { 227 + reject(new Error(`Failed to send the message ${msg} to the SharedWorker.`)) 228 + }, 5_000) 226 229 worker.port.addEventListener('message', function onmessage(e) { 227 230 worker.port.removeEventListener('message', onmessage) 231 + clearTimeout(timeout) 228 232 resolve(e.data as string) 229 233 }) 230 234 }) ··· 232 236 233 237 function sendOnMessage(worker: SharedWorker, msg: any) { 234 238 worker.port.postMessage(msg) 235 - return new Promise<string>((resolve) => { 239 + return new Promise<string>((resolve, reject) => { 240 + const timeout = setTimeout(() => { 241 + reject(new Error(`Failed to send the message ${msg} to the SharedWorker.`)) 242 + }, 5_000) 236 243 worker.port.onmessage = function onmessage(e) { 237 244 worker.port.onmessage = null 245 + clearTimeout(timeout) 238 246 resolve(e.data as string) 239 247 } 240 248 })
+8
test/reporters/tests/html.test.ts
··· 31 31 const resultJson = parse(metaJson.replace(new RegExp(vitestRoot, 'g'), '<rootDir>')) 32 32 resultJson.config = {} // doesn't matter for a test 33 33 const file = resultJson.files[0] 34 + // reset durations and id 34 35 file.id = 0 35 36 file.collectDuration = 0 36 37 file.environmentLoad = 0 ··· 39 40 file.importDurations = {} 40 41 file.result.duration = 0 41 42 file.result.startTime = 0 43 + 42 44 const task = file.tasks[0] 43 45 task.id = 0 44 46 task.result.duration = 0 45 47 task.result.startTime = 0 48 + 46 49 expect(task.result.errors).not.toBeDefined() 47 50 expect(task.result.logs).not.toBeDefined() 51 + 48 52 expect(resultJson).toMatchSnapshot(`tests are passing`) 49 53 expect(indexHtml).toMatch('window.METADATA_PATH="html.meta.json.gz"') 50 54 }, 120000) ··· 70 74 const resultJson = parse(metaJson.replace(new RegExp(vitestRoot, 'g'), '<rootDir>')) 71 75 resultJson.config = {} // doesn't matter for a test 72 76 const file = resultJson.files[0] 77 + // reset durations and id 73 78 file.id = 0 74 79 file.collectDuration = 0 75 80 file.environmentLoad = 0 ··· 78 83 file.importDurations = {} 79 84 file.result.duration = 0 80 85 file.result.startTime = 0 86 + 81 87 const task = file.tasks[0] 82 88 task.id = 0 83 89 task.result.duration = 0 84 90 task.result.startTime = 0 91 + 85 92 expect(task.result.errors).toBeDefined() 86 93 task.result.errors[0].stack = task.result.errors[0].stack.split('\n')[0] 87 94 expect(task.logs).toBeDefined() 88 95 expect(task.logs).toHaveLength(1) 89 96 task.logs[0].taskId = 0 90 97 task.logs[0].time = 0 98 + 91 99 expect(resultJson).toMatchSnapshot(`tests are failing`) 92 100 expect(indexHtml).toMatch('window.METADATA_PATH="html.meta.json.gz"') 93 101 }, 120000)
+1 -1
packages/vitest/src/node/test-run.ts
··· 105 105 process.exitCode = 1 106 106 } 107 107 108 - this.vitest.report('onTestRunEnd', modules, [...errors] as SerializedError[], state) 108 + await this.vitest.report('onTestRunEnd', modules, [...errors] as SerializedError[], state) 109 109 } 110 110 111 111 private hasFailed(modules: TestModule[]) {
-1
test/config/fixtures/get-state/vitest.config.ts
··· 3 3 export default defineConfig({ 4 4 test: { 5 5 isolate: false, 6 - minWorkers: 1, 7 6 maxWorkers: 1, 8 7 } 9 8 })
-12
packages/vitest/src/node/cli/cli-config.ts
··· 66 66 description: 'Maximum number or percentage of threads to run tests in', 67 67 argument: '<workers>', 68 68 }, 69 - minThreads: { 70 - description: 'Minimum number or percentage of threads to run tests in', 71 - argument: '<workers>', 72 - }, 73 69 useAtomics: { 74 70 description: 75 71 'Use Atomics to synchronize threads. This can improve performance in some cases, but might cause segfault in older Node versions (default: `false`)', ··· 86 82 }, 87 83 maxForks: { 88 84 description: 'Maximum number or percentage of processes to run tests in', 89 - argument: '<workers>', 90 - }, 91 - minForks: { 92 - description: 'Minimum number or percentage of processes to run tests in', 93 85 argument: '<workers>', 94 86 }, 95 87 execArgv: null, ··· 479 471 }, 480 472 maxWorkers: { 481 473 description: 'Maximum number or percentage of workers to run tests in', 482 - argument: '<workers>', 483 - }, 484 - minWorkers: { 485 - description: 'Minimum number or percentage of workers to run tests in', 486 474 argument: '<workers>', 487 475 }, 488 476 environment: {
-37
packages/vitest/src/node/config/resolveConfig.ts
··· 206 206 resolved.maxWorkers = resolveInlineWorkerOption(resolved.maxWorkers) 207 207 } 208 208 209 - if (resolved.minWorkers) { 210 - resolved.minWorkers = resolveInlineWorkerOption(resolved.minWorkers) 211 - } 212 - 213 209 // run benchmark sequentially by default 214 210 resolved.fileParallelism ??= mode !== 'benchmark' 215 211 216 212 if (!resolved.fileParallelism) { 217 213 // ignore user config, parallelism cannot be implemented without limiting workers 218 214 resolved.maxWorkers = 1 219 - resolved.minWorkers = 1 220 215 } 221 216 222 217 if (resolved.maxConcurrency === 0) { ··· 482 477 } 483 478 } 484 479 485 - if (process.env.VITEST_MIN_THREADS) { 486 - resolved.poolOptions = { 487 - ...resolved.poolOptions, 488 - threads: { 489 - ...resolved.poolOptions?.threads, 490 - minThreads: Number.parseInt(process.env.VITEST_MIN_THREADS), 491 - }, 492 - vmThreads: { 493 - ...resolved.poolOptions?.vmThreads, 494 - minThreads: Number.parseInt(process.env.VITEST_MIN_THREADS), 495 - }, 496 - } 497 - } 498 - 499 480 if (process.env.VITEST_MAX_FORKS) { 500 481 resolved.poolOptions = { 501 482 ...resolved.poolOptions, ··· 510 491 } 511 492 } 512 493 513 - if (process.env.VITEST_MIN_FORKS) { 514 - resolved.poolOptions = { 515 - ...resolved.poolOptions, 516 - forks: { 517 - ...resolved.poolOptions?.forks, 518 - minForks: Number.parseInt(process.env.VITEST_MIN_FORKS), 519 - }, 520 - vmForks: { 521 - ...resolved.poolOptions?.vmForks, 522 - minForks: Number.parseInt(process.env.VITEST_MIN_FORKS), 523 - }, 524 - } 525 - } 526 - 527 494 const poolThreadsOptions = [ 528 - ['threads', 'minThreads'], 529 495 ['threads', 'maxThreads'], 530 - ['vmThreads', 'minThreads'], 531 496 ['vmThreads', 'maxThreads'], 532 497 ] as const satisfies [keyof PoolOptions, keyof ThreadsOptions][] 533 498 ··· 538 503 } 539 504 540 505 const poolForksOptions = [ 541 - ['forks', 'minForks'], 542 506 ['forks', 'maxForks'], 543 - ['vmForks', 'minForks'], 544 507 ['vmForks', 'maxForks'], 545 508 ] as const satisfies [keyof PoolOptions, keyof ForksOptions][] 546 509
+4 -2
packages/vitest/src/node/pools/forks.ts
··· 85 85 86 86 const maxThreads 87 87 = poolOptions.maxForks ?? vitest.config.maxWorkers ?? recommendedCount 88 - const minThreads 89 - = poolOptions.minForks ?? vitest.config.minWorkers ?? Math.min(recommendedCount, maxThreads) 88 + const minThreads = vitest.config.watch 89 + ? Math.min(recommendedCount, maxThreads) 90 + // avoid recreating threads when tests are finished 91 + : 0 90 92 91 93 const worker = resolve(vitest.distPath, 'workers/forks.js') 92 94
+4 -2
packages/vitest/src/node/pools/threads.ts
··· 66 66 67 67 const maxThreads 68 68 = poolOptions.maxThreads ?? vitest.config.maxWorkers ?? recommendedCount 69 - const minThreads 70 - = poolOptions.minThreads ?? vitest.config.minWorkers ?? Math.min(recommendedCount, maxThreads) 69 + const minThreads = vitest.config.watch 70 + ? Math.min(recommendedCount, maxThreads) 71 + // avoid recreating forks when tests are finished 72 + : 0 71 73 72 74 const worker = resolve(vitest.distPath, 'workers/threads.js') 73 75
+4 -2
packages/vitest/src/node/pools/vmForks.ts
··· 92 92 93 93 const maxThreads 94 94 = poolOptions.maxForks ?? vitest.config.maxWorkers ?? recommendedCount 95 - const minThreads 96 - = poolOptions.maxForks ?? vitest.config.minWorkers ?? Math.min(recommendedCount, maxThreads) 95 + const minThreads = vitest.config.watch 96 + ? Math.min(recommendedCount, maxThreads) 97 + // avoid recreating forks when tests are finished 98 + : 0 97 99 98 100 const worker = resolve(vitest.distPath, 'workers/vmForks.js') 99 101
+4 -2
packages/vitest/src/node/pools/vmThreads.ts
··· 69 69 70 70 const maxThreads 71 71 = poolOptions.maxThreads ?? vitest.config.maxWorkers ?? recommendedCount 72 - const minThreads 73 - = poolOptions.minThreads ?? vitest.config.minWorkers ?? Math.min(recommendedCount, maxThreads) 72 + const minThreads = vitest.config.watch 73 + ? Math.min(recommendedCount, maxThreads) 74 + // avoid recreating threads when tests are finished 75 + : 0 74 76 75 77 const worker = resolve(vitest.distPath, 'workers/vmThreads.js') 76 78
+1 -7
packages/vitest/src/node/types/config.ts
··· 304 304 * Maximum number or percentage of workers to run tests in. `poolOptions.{threads,vmThreads}.maxThreads`/`poolOptions.forks.maxForks` has higher priority. 305 305 */ 306 306 maxWorkers?: number | string 307 - /** 308 - * Minimum number or percentage of workers to run tests in. `poolOptions.{threads,vmThreads}.minThreads`/`poolOptions.forks.minForks` has higher priority. 309 - */ 310 - minWorkers?: number | string 311 307 312 308 /** 313 309 * Should all test files run in parallel. Doesn't affect tests running in the same file. 314 - * Setting this to `false` will override `maxWorkers` and `minWorkers` options to `1`. 310 + * Setting this to `false` will override `maxWorkers` option to `1`. 315 311 * 316 312 * @default true 317 313 */ ··· 1014 1010 runner?: string 1015 1011 1016 1012 maxWorkers: number 1017 - minWorkers: number 1018 1013 } 1019 1014 1020 1015 type NonProjectOptions ··· 1044 1039 | 'inspectBrk' 1045 1040 | 'coverage' 1046 1041 | 'maxWorkers' 1047 - | 'minWorkers' 1048 1042 | 'fileParallelism' 1049 1043 | 'watchTriggerPatterns' 1050 1044
-8
packages/vitest/src/node/types/pool-options.ts
··· 50 50 } 51 51 52 52 export interface ThreadsOptions { 53 - /** Minimum amount of threads to use */ 54 - minThreads?: number | string 55 - 56 53 /** Maximum amount of threads to use */ 57 54 maxThreads?: number | string 58 55 ··· 74 71 } 75 72 76 73 export interface ResolvedThreadsOptions extends ThreadsOptions { 77 - minThreads?: number 78 74 maxThreads?: number 79 75 } 80 76 81 77 export interface ForksOptions { 82 - /** Minimum amount of child processes to use */ 83 - minForks?: number | string 84 - 85 78 /** Maximum amount of child processes to use */ 86 79 maxForks?: number | string 87 80 ··· 94 87 } 95 88 96 89 export interface ResolvedForksOptions extends ForksOptions { 97 - minForks?: number 98 90 maxForks?: number 99 91 } 100 92