Skip to content

Commit db1894e

Browse files
authored
Merge pull request #824 from zero-years/docs--translate-guide/cli-and-guide/cli-generated
docs(cli): translate guide/cli and guide/cli-generated
2 parents 0cfb80a + 0e084e3 commit db1894e

File tree

2 files changed

+31
-30
lines changed

2 files changed

+31
-30
lines changed

guide/cli-generated.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
- **命令行终端:** `--coverage.skipFull`
174174
- **配置:** [coverage.skipFull](/config/#coverage-skipfull)
175175

176-
不显示语句、分支和函数覆盖率为 100% 的文件(默认值:`false`
176+
不显示语句、分支和函数覆盖率为 100% 的文件(默认值:`false`
177177

178178
### coverage.thresholds.100
179179

@@ -245,25 +245,25 @@
245245

246246
- **命令行终端:** `--coverage.watermarks.statements <watermarks>`
247247

248-
High and low watermarks for statements in the format of `<high>,<low>`
248+
语句格式的高低标准线 `<high>,<low>`
249249

250250
### coverage.watermarks.lines
251251

252252
- **命令行终端:** `--coverage.watermarks.lines <watermarks>`
253253

254-
High and low watermarks for lines in the format of `<high>,<low>`
254+
行格式的高低标准线 `<high>,<low>`
255255

256256
### coverage.watermarks.branches
257257

258258
- **命令行终端:** `--coverage.watermarks.branches <watermarks>`
259259

260-
High and low watermarks for branches in the format of `<high>,<low>`
260+
分支格式的高低标准线 `<high>,<low>`
261261

262262
### coverage.watermarks.functions
263263

264264
- **命令行终端:** `--coverage.watermarks.functions <watermarks>`
265265

266-
High and low watermarks for functions in the format of `<high>,<low>`
266+
函数格式的高低标准线 `<high>,<low>`
267267

268268
### mode
269269

@@ -381,7 +381,7 @@ High and low watermarks for functions in the format of `<high>,<low>`
381381
- **命令行终端:** `--browser.trace <mode>`
382382
- **配置:** [browser.trace](/guide/browser/config#browser-trace)
383383

384-
Enable trace view mode. Supported: "on", "off", "on-first-retry", "on-all-retries", "retain-on-failure".
384+
开启追踪视图模式。 可选项: "on", "off", "on-first-retry", "on-all-retries", "retain-on-failure"
385385

386386
### pool
387387

@@ -437,7 +437,7 @@ Enable trace view mode. Supported: "on", "off", "on-first-retry", "on-all-retrie
437437
- **命令行终端:** `--poolOptions.vmThreads.maxThreads <workers>`
438438
- **配置:** [poolOptions.vmThreads.maxThreads](/config/#pooloptions-vmthreads-maxthreads)
439439

440-
运行测试的最大线程数或百分比
440+
运行测试的最大线程数或百分比
441441

442442
### poolOptions.vmThreads.useAtomics
443443

@@ -591,7 +591,7 @@ VM forks pool 的内存限制。如果你观察到内存泄漏问题,可以尝
591591
- **命令行终端:** `--sequence.setupFiles <order>`
592592
- **配置:** [sequence.setupFiles](/config/#sequence-setupfiles)
593593

594-
更改设置文件的执行顺序。可接受的值有 "list" 和 "parallel"。如果设置为"list",将按照定义的顺序运行设置文件。如果设置为 "parallel",将并行运行设置文件(默认值:`"parallel"`)。
594+
更改设置文件的执行顺序。可接受的值有 "list" 和 "parallel"。如果设置为"list",将按照定义的顺序运行设置文件。如果设置为 "parallel",将并行运行设置文件(默认值:`"parallel"`)。
595595

596596
### inspect
597597

@@ -640,28 +640,28 @@ VM forks pool 的内存限制。如果你观察到内存泄漏问题,可以尝
640640
- **命令行终端:** `--diff.aAnnotation <annotation>`
641641
- **配置:** [diff.aAnnotation](/config/#diff-aannotation)
642642

643-
Annotation for expected lines (default: `Expected`)
643+
预期行的注释 (默认值: `Expected`)
644644

645645
### diff.aIndicator
646646

647647
- **命令行终端:** `--diff.aIndicator <indicator>`
648648
- **配置:** [diff.aIndicator](/config/#diff-aindicator)
649649

650-
Indicator for expected lines (default: `-`)
650+
预期行的指标 (默认值: `-`)
651651

652652
### diff.bAnnotation
653653

654654
- **命令行终端:** `--diff.bAnnotation <annotation>`
655655
- **配置:** [diff.bAnnotation](/config/#diff-bannotation)
656656

657-
Annotation for received lines (default: `Received`)
657+
接收行的注释 (默认值: `Received`)
658658

659659
### diff.bIndicator
660660

661661
- **命令行终端:** `--diff.bIndicator <indicator>`
662662
- **配置:** [diff.bIndicator](/config/#diff-bindicator)
663663

664-
Indicator for received lines (default: `+`)
664+
接收行的指标 (默认值: `+`)
665665

666666
### diff.commonIndicator
667667

@@ -675,14 +675,14 @@ Indicator for common lines (default: ` `)
675675
- **命令行终端:** `--diff.contextLines <lines>`
676676
- **配置:** [diff.contextLines](/config/#diff-contextlines)
677677

678-
Number of lines of context to show around each change (default: `5`)
678+
每次更改内容上下显示的上下文行数 (默认值: `5`)
679679

680680
### diff.emptyFirstOrLastLinePlaceholder
681681

682682
- **命令行终端:** `--diff.emptyFirstOrLastLinePlaceholder <placeholder>`
683683
- **配置:** [diff.emptyFirstOrLastLinePlaceholder](/config/#diff-emptyfirstorlastlineplaceholder)
684684

685-
Placeholder for an empty first or last line (default: `""`)
685+
空的第一行或最后一行的占位符 (默认值: `""`)
686686

687687
### diff.expand
688688

@@ -696,42 +696,42 @@ Expand all common lines (default: `true`)
696696
- **命令行终端:** `--diff.includeChangeCounts`
697697
- **配置:** [diff.includeChangeCounts](/config/#diff-includechangecounts)
698698

699-
Include comparison counts in diff output (default: `false`)
699+
diff 的输出中输出比较计数 (默认值: `false`)
700700

701701
### diff.omitAnnotationLines
702702

703703
- **命令行终端:** `--diff.omitAnnotationLines`
704704
- **配置:** [diff.omitAnnotationLines](/config/#diff-omitannotationlines)
705705

706-
Omit annotation lines from the output (default: `false`)
706+
省略输出中的注释 (默认值: `false`)
707707

708708
### diff.printBasicPrototype
709709

710710
- **命令行终端:** `--diff.printBasicPrototype`
711711
- **配置:** [diff.printBasicPrototype](/config/#diff-printbasicprototype)
712712

713-
Print basic prototype Object and Array (default: `true`)
713+
打印基础的原型 `Object``Array` (默认值: `true`)
714714

715715
### diff.maxDepth
716716

717717
- **命令行终端:** `--diff.maxDepth <maxDepth>`
718718
- **配置:** [diff.maxDepth](/config/#diff-maxdepth)
719719

720-
Limit the depth to recurse when printing nested objects (default: `20`)
720+
嵌套对象打印的最深深度 (默认值: `20`)
721721

722722
### diff.truncateThreshold
723723

724724
- **命令行终端:** `--diff.truncateThreshold <threshold>`
725725
- **配置:** [diff.truncateThreshold](/config/#diff-truncatethreshold)
726726

727-
Number of lines to show before and after each change (default: `0`)
727+
每次更改的差异对比行数 (默认值: `0`)
728728

729729
### diff.truncateAnnotation
730730

731731
- **命令行终端:** `--diff.truncateAnnotation <annotation>`
732732
- **配置:** [diff.truncateAnnotation](/config/#diff-truncateannotation)
733733

734-
Annotation for truncated lines (default: `... Diff result is truncated`)
734+
在 diff 结果末尾输出的注释(如果被截断) (默认值: `... Diff result is truncated`)
735735

736736
### exclude
737737

@@ -780,28 +780,28 @@ Annotation for truncated lines (default: `... Diff result is truncated`)
780780
- **命令行终端:** `--typecheck.allowJs`
781781
- **配置:** [typecheck.allowJs](/config/#typecheck-allowjs)
782782

783-
允许对 JavaScript 文件进行类型检查。默认值取自 tsconfig.json
783+
允许对 JavaScript 文件进行类型检查。默认值取自 tsconfig.json
784784

785785
### typecheck.ignoreSourceErrors
786786

787787
- **命令行终端:** `--typecheck.ignoreSourceErrors`
788788
- **配置:** [typecheck.ignoreSourceErrors](/config/#typecheck-ignoresourceerrors)
789789

790-
忽略源文件中的类型错误
790+
忽略源文件中的类型错误
791791

792792
### typecheck.tsconfig
793793

794794
- **命令行终端:** `--typecheck.tsconfig <path>`
795795
- **配置:** [typecheck.tsconfig](/config/#typecheck-tsconfig)
796796

797-
自定义 tsconfig 文件的路径
797+
自定义 tsconfig 文件的路径
798798

799799
### typecheck.spawnTimeout
800800

801801
- **命令行终端:** `--typecheck.spawnTimeout <time>`
802802
- **配置:** [typecheck.spawnTimeout](/config/#typecheck-spawntimeout)
803803

804-
Minimum time in milliseconds it takes to spawn the typechecker
804+
启动类型检查器所需的最短时间(以毫秒为单位)。
805805

806806
### project
807807

@@ -857,21 +857,21 @@ Minimum time in milliseconds it takes to spawn the typechecker
857857
- **命令行终端:** `--printConsoleTrace`
858858
- **配置:** [printConsoleTrace](/config/#printconsoletrace)
859859

860-
始终打印控制台堆栈跟踪
860+
始终打印控制台堆栈跟踪
861861

862862
### includeTaskLocation
863863

864864
- **命令行终端:** `--includeTaskLocation`
865865
- **配置:** [includeTaskLocation](/config/#includetasklocation)
866866

867-
Collect test and suite locations in the `location` property
867+
收集 `location` 属性中的测试和套件
868868

869869
### attachmentsDir
870870

871871
- **命令行终端:** `--attachmentsDir <dir>`
872872
- **配置:** [attachmentsDir](/config/#attachmentsdir)
873873

874-
The directory where attachments from `context.annotate` are stored in (default: `.vitest-attachments`)
874+
`context.annotate` 方法生成的附件文件的储存目录 (默认值: `.vitest-attachments`)
875875

876876
### run
877877

@@ -889,13 +889,13 @@ The directory where attachments from `context.annotate` are stored in (default:
889889

890890
- **命令行终端:** `--clearScreen`
891891

892-
watch 模式下重新运行测试时清除终端屏幕(默认值:`true`)。
892+
watch 模式下重新运行测试时清除终端屏幕(默认值:`true`)。
893893

894894
### configLoader
895895

896896
- **命令行终端:** `--configLoader <loader>`
897897

898-
Use `bundle` to bundle the config with esbuild or `runner` (experimental) to process it on the fly. This is only available in vite version 6.1.0 and above. (default: `bundle`)
898+
使用 `bundle` 将配置打包到 esbuild 中,或使用 `runner`(实验性功能)进行动态处理。此功能仅适用于 Vite 6.1.0 及更高版本。 (默认值: `bundle`)
899899

900900
### standalone
901901

guide/cli.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ vitest foobar
1919

2020
将仅运行路径中包含 `foobar` 的测试文件。 此过滤器仅检查包含,不支持正则表达式或 glob 模式(除非你的终端在 Vitest 接收过滤器之前对其进行处理)。
2121

22-
Since Vitest 3, you can also specify the test by filename and line number:
22+
Vitest 3 开始,您还可以通过文件名和行号指定测试:
2323

2424
```bash
2525
$ vitest basic/foo.test.ts:10
@@ -42,6 +42,7 @@ $ vitest ./basic/foo:10 # ❌
4242
$ vitest basic/foo.test.ts:10, basic/foo.test.ts:25 #
4343
$ vitest basic/foo.test.ts:10-25 #
4444
```
45+
4546
:::
4647

4748
### `vitest run`

0 commit comments

Comments
 (0)