Skip to content

Commit 422e6dc

Browse files
committed
采纳建议
1 parent 5f9c96d commit 422e6dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

guide/mocking.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ vi.spyOn(exports, 'method').mockImplementation(() => {})
534534

535535
- 模拟模块导出 class implementation
536536

537-
`vi.mock` 和原型配合的示例:
537+
`vi.mock` 和 prototype 的示例:
538538

539539
```ts
540540
// some-path.ts
@@ -572,7 +572,7 @@ vi.mock('./some-path.js', () => {
572572
import * as exports from './some-path.js'
573573

574574
vi.spyOn(exports, 'SomeClass').mockImplementation(() => {
575-
// whatever suites you from first two examples
575+
// 前两个例子中有非常适合你的
576576
})
577577
```
578578

@@ -634,7 +634,7 @@ vi.mock('./some-path.js', async () => {
634634
}
635635
})
636636
original() // 有原始的行为
637-
mocked() // 是一个间谍函数
637+
mocked() // 是一个 spy 函数
638638
```
639639

640640
- 模拟当前日期

0 commit comments

Comments
 (0)