Skip to content

Commit 10b3e17

Browse files
authored
Merge pull request #757 from WuMingDao/patch-10
docs(/advanced/api/test-suite): Add comments translate
2 parents 5da4e8b + 2e004de commit 10b3e17

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

advanced/api/test-suite.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ for (const task of suite.children) {
123123
console.log('test', task.fullName)
124124
}
125125
else {
126-
// task is TaskSuite
126+
// 任务是 TaskSuite
127127
console.log('suite', task.name)
128128
}
129129
}
@@ -136,11 +136,11 @@ for (const task of suite.children) {
136136
function visit(collection: TestCollection) {
137137
for (const task of collection) {
138138
if (task.type === 'suite') {
139-
// report a suite
139+
// 报告套件
140140
visit(task.children)
141141
}
142142
else {
143-
// report a test
143+
// 报告测试
144144
}
145145
}
146146
}
@@ -204,12 +204,12 @@ function meta(): TaskMeta
204204
import { test } from 'vitest'
205205
206206
describe('the validation works correctly', (task) => {
207-
// assign "decorated" during collection
207+
// 在收集过程中指定 “decorated
208208
task.meta.decorated = false
209209
210210
test('some test', ({ task }) => {
211-
// assign "decorated" during test run, it will be available
212-
// only in onTestCaseReady hook
211+
// 在试运行期间指定 “decorated”,它将可用
212+
// 仅在 onTestCaseReady hook
213213
task.suite.meta.decorated = false
214214
})
215215
})

0 commit comments

Comments
 (0)