Skip to content

Commit

Permalink
fix(types): mark pool options as not available in project config (#5934)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Jun 20, 2024
1 parent 3a96a3d commit 486fd11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ Pass additional arguments to `node` process in the VM context. See [Command-line
Be careful when using, it as some options may crash worker, e.g. --prof, --title. See https://github.com/nodejs/node/issues/41103.
:::

### fileParallelism {#fileparallelism}
### fileParallelism<NonProjectOption /> {#fileparallelism}

- **Type:** `boolean`
- **Default:** `true`
Expand All @@ -912,13 +912,13 @@ Should all test files run in parallel. Setting this to `false` will override `ma
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).
:::

### maxWorkers {#maxworkers}
### maxWorkers<NonProjectOption /> {#maxworkers}

- **Type:** `number`

Maximum number of workers to run tests in. `poolOptions.{threads,vmThreads}.maxThreads`/`poolOptions.forks.maxForks` has higher priority.

### minWorkers {#minworkers}
### minWorkers<NonProjectOption /> {#minworkers}

- **Type:** `number`

Expand Down
3 changes: 3 additions & 0 deletions packages/vitest/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,9 @@ export type ProjectConfig = Omit<
| 'inspectBrk'
| 'deps'
| 'coverage'
| 'maxWorkers'
| 'minWorkers'
| 'fileParallelism'
> & {
sequencer?: Omit<SequenceOptions, 'sequencer' | 'seed'>
deps?: Omit<DepsOptions, 'moduleDirectories'>
Expand Down

0 comments on commit 486fd11

Please sign in to comment.