Skip to content

Commit 5053a5d

Browse files
authoredDec 31, 2023
fix: correct option name --no-parallelism (#4831)
1 parent 09646f1 commit 5053a5d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed
 

‎docs/guide/cli.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Run only [benchmark](https://vitest.dev/guide/features.html#benchmarking-experim
7373
| `--poolOptions <options>` | Specify pool options |
7474
| `--poolOptions.threads.isolate` | Isolate tests in threads pool (default: `true`) |
7575
| `--poolOptions.forks.isolate` | Isolate tests in forks pool (default: `true`) |
76-
| `--fileParallelism` | Should all test files run in parallel. Use --no-parallelism to disable (default: true) |
76+
| `--fileParallelism` | Should all test files run in parallel. Use --no-file-parallelism to disable (default: true) |
7777
| `--maxWorkers` | Maximum number of workers to run tests in |
7878
| `--minWorkers` | Minimum number of workers to run tests in |
7979
| `--silent` | Silent console output from tests |

‎docs/guide/debugging.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ vitest --inspect-brk --pool threads --poolOptions.threads.singleThread
6262
vitest --inspect-brk --pool forks --poolOptions.forks.singleFork
6363
```
6464

65-
If you are using Vitest 1.1 or higher, you can also just provide `--no-parallelism` flag:
65+
If you are using Vitest 1.1 or higher, you can also just provide `--no-file-parallelism` flag:
6666

6767
```sh
6868
# If pool is unknown

‎packages/vitest/src/node/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export function resolveConfig(
134134

135135
if (resolved.fileParallelism && !isSingleThread && !isSingleFork) {
136136
const inspectOption = `--inspect${resolved.inspectBrk ? '-brk' : ''}`
137-
throw new Error(`You cannot use ${inspectOption} without "--no-parallelism", "poolOptions.threads.singleThread" or "poolOptions.forks.singleFork"`)
137+
throw new Error(`You cannot use ${inspectOption} without "--no-file-parallelism", "poolOptions.threads.singleThread" or "poolOptions.forks.singleFork"`)
138138
}
139139
}
140140

‎test/config/test/failures.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ test('shard index must be smaller than count', async () => {
3333
test('inspect requires changing pool and singleThread/singleFork', async () => {
3434
const { stderr } = await runVitest({ inspect: true })
3535

36-
expect(stderr).toMatch('Error: You cannot use --inspect without "--no-parallelism", "poolOptions.threads.singleThread" or "poolOptions.forks.singleFork"')
36+
expect(stderr).toMatch('Error: You cannot use --inspect without "--no-file-parallelism", "poolOptions.threads.singleThread" or "poolOptions.forks.singleFork"')
3737
})
3838

3939
test('inspect cannot be used with multi-threading', async () => {
4040
const { stderr } = await runVitest({ inspect: true, pool: 'threads', poolOptions: { threads: { singleThread: false } } })
4141

42-
expect(stderr).toMatch('Error: You cannot use --inspect without "--no-parallelism", "poolOptions.threads.singleThread" or "poolOptions.forks.singleFork"')
42+
expect(stderr).toMatch('Error: You cannot use --inspect without "--no-file-parallelism", "poolOptions.threads.singleThread" or "poolOptions.forks.singleFork"')
4343
})
4444

4545
test('inspect-brk cannot be used with multi processing', async () => {
4646
const { stderr } = await runVitest({ inspect: true, pool: 'forks', poolOptions: { forks: { singleFork: false } } })
4747

48-
expect(stderr).toMatch('Error: You cannot use --inspect without "--no-parallelism", "poolOptions.threads.singleThread" or "poolOptions.forks.singleFork"')
48+
expect(stderr).toMatch('Error: You cannot use --inspect without "--no-file-parallelism", "poolOptions.threads.singleThread" or "poolOptions.forks.singleFork"')
4949
})
5050

5151
test('c8 coverage provider is not supported', async () => {

0 commit comments

Comments
 (0)