We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f9c96d commit 422e6dcCopy full SHA for 422e6dc
guide/mocking.md
@@ -534,7 +534,7 @@ vi.spyOn(exports, 'method').mockImplementation(() => {})
534
535
- 模拟模块导出 class implementation
536
537
-`vi.mock` 和原型配合的示例:
+`vi.mock` 和 prototype 的示例:
538
539
```ts
540
// some-path.ts
@@ -572,7 +572,7 @@ vi.mock('./some-path.js', () => {
572
import * as exports from './some-path.js'
573
574
vi.spyOn(exports, 'SomeClass').mockImplementation(() => {
575
- // whatever suites you from first two examples
+ // 前两个例子中有非常适合你的
576
})
577
```
578
@@ -634,7 +634,7 @@ vi.mock('./some-path.js', async () => {
634
}
635
636
original() // 有原始的行为
637
-mocked() // 是一个间谍函数
+mocked() // 是一个 spy 函数
638
639
640
- 模拟当前日期
0 commit comments