Skip to content

Commit 922a4f0

Browse files
authored
Merge pull request #376 from yionr/patch-1
docs(cn): typo & translate in workspace.md
2 parents 45ea180 + b78284e commit 922a4f0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

guide/workspace.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: 工作空间 | 指南
44

55
# 工作空间
66

7-
Vitest 通过工作空间配置文件提供了对 monotrepositions 的内置支持。你可以创建一个工作空间来定义项目的配置。
7+
Vitest 通过工作空间配置文件提供了对 monorepos 的内置支持。你可以创建一个工作空间来定义项目的配置。
88

99
## 定义工作空间
1010

@@ -49,15 +49,15 @@ export default ['packages/*/vitest.config.{e2e,unit}.ts']
4949
```ts [vitest.workspace.ts]
5050
import { defineWorkspace } from 'vitest/config'
5151

52-
// defineWorkspace provides a nice type hinting DX
52+
// defineWorkspace 会提供一个很好的类型提示开发体验
5353
export default defineWorkspace([
5454
'packages/*',
5555
{
56-
// add "extends" to merge two configs together
56+
// 添加 "extends" 将两个配置合并到一起
5757
extends: './vite.config.js',
5858
test: {
5959
include: ['tests/**/*.{browser}.test.{ts,js}'],
60-
// it is recommended to define a name when using inline configs
60+
// 在使用内联配置的时候,建议定义一个名称
6161
name: 'happy-dom',
6262
environment: 'happy-dom',
6363
},
@@ -98,8 +98,8 @@ import { defineProject } from 'vitest/config'
9898
export default defineProject({
9999
test: {
100100
environment: 'jsdom',
101-
// "reporters" is not supported in a project config,
102-
// so it will show an error
101+
// "reporters" 在项目配置中是不支持的,
102+
// 所以会报错
103103
reporters: ['json'],
104104
},
105105
})

0 commit comments

Comments
 (0)