Skip to content

Commit 39f0258

Browse files
ohhoney1eddyerburgh
authored andcommitted
docs: fix typo in testing-async-components.md (#855)
1 parent 172310c commit 39f0258

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: docs/zh/guides/testing-async-components.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ test('Foo', () => {
5757
})
5858
```
5959

60-
现在这则测试用例会失败,因为断言在 `fetchResults` 中的 Promise 完成之前就被调用了。大多数单元测试库都提供一个回调来使得运行期知道测试用例的完成时机。Jest 和 Mocha 都是用了 `done`。我们可以和 `$nectTick``setTimeout` 结合使用 `done` 来确保任何 Promise 都会在断言之前完成。
60+
现在这则测试用例会失败,因为断言在 `fetchResults` 中的 Promise 完成之前就被调用了。大多数单元测试库都提供一个回调来使得运行期知道测试用例的完成时机。Jest 和 Mocha 都是用了 `done`。我们可以和 `$nextTick``setTimeout` 结合使用 `done` 来确保任何 Promise 都会在断言之前完成。
6161

6262
``` js
6363
test('Foo', () => {

0 commit comments

Comments
 (0)