File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ title: 工作空间 | 指南
4
4
5
5
# 工作空间
6
6
7
- Vitest 通过工作空间配置文件提供了对 monotrepositions 的内置支持。你可以创建一个工作空间来定义项目的配置。
7
+ Vitest 通过工作空间配置文件提供了对 monorepos 的内置支持。你可以创建一个工作空间来定义项目的配置。
8
8
9
9
## 定义工作空间
10
10
@@ -49,15 +49,15 @@ export default ['packages/*/vitest.config.{e2e,unit}.ts']
49
49
``` ts [vitest.workspace.ts]
50
50
import { defineWorkspace } from ' vitest/config'
51
51
52
- // defineWorkspace provides a nice type hinting DX
52
+ // defineWorkspace 会提供一个很好的类型提示开发体验
53
53
export default defineWorkspace ([
54
54
' packages/*' ,
55
55
{
56
- // add "extends" to merge two configs together
56
+ // 添加 "extends" 将两个配置合并到一起
57
57
extends: ' ./vite.config.js' ,
58
58
test: {
59
59
include: [' tests/**/*.{browser}.test.{ts,js}' ],
60
- // it is recommended to define a name when using inline configs
60
+ // 在使用内联配置的时候,建议定义一个名称
61
61
name: ' happy-dom' ,
62
62
environment: ' happy-dom' ,
63
63
},
@@ -98,8 +98,8 @@ import { defineProject } from 'vitest/config'
98
98
export default defineProject ({
99
99
test: {
100
100
environment: ' jsdom' ,
101
- // "reporters" is not supported in a project config,
102
- // so it will show an error
101
+ // "reporters" 在项目配置中是不支持的,
102
+ // 所以会报错
103
103
reporters: [' json' ],
104
104
},
105
105
})
You can’t perform that action at this time.
0 commit comments