File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -579,7 +579,7 @@ function guide(): DefaultTheme.SidebarItem[] {
579579 link : '/guide/mocking' ,
580580 } ,
581581 {
582- text : '并行执行 ' ,
582+ text : '并行性 ' ,
583583 link : '/guide/parallelism' ,
584584 } ,
585585 {
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ outline: deep
77
88## 文件级并行 {#file-parallelism}
99
10- Vitest 默认会并行执行 _ 测试文件_ 。具体使用哪种并行机制取决于配置的 ` pool ` 类型 :
10+ 默认情况下, Vitest 会并行运行 _ 测试文件_ 。根据指定的 ` pool ` ,Vitest 会采用不同的并行化机制 :
1111
1212- ` forks ` (默认)和 ` vmForks ` 会在不同的 [ child processes] ( https://nodejs.org/api/child_process.html ) 中执行测试
1313- ` threads ` 和 ` vmThreads ` 则会在不同的 [ worker threads] ( https://nodejs.org/api/worker_threads.html ) 中运行
@@ -16,7 +16,7 @@ Vitest 默认会并行执行 _测试文件_ 。具体使用哪种并行机制取
1616
1717如果项目包含大量测试文件,通常并行执行会大幅提升速度。但具体效果还要看项目本身、运行环境以及是否启用了 [ 隔离] ( /config/#isolate ) 。若需要关闭文件级并行化,可以将 [ ` fileParallelism ` ] ( /config/#fileparallelism ) 设为 ` false ` 。更多性能优化技巧,请参考 [ 性能指南] ( /guide/improving-performance ) 。
1818
19- ## 测试用例并行 {#test-parallelism}
19+ ## 测试级并行 {#test-parallelism}
2020
2121与 _ 测试文件_ 不同, Vitest 在同一个文件中会顺序执行 _ 测试用例_ 。也就是说,同一个文件里的测试会按定义顺序一个接一个地执行。
2222
You can’t perform that action at this time.
0 commit comments