diff --git a/docs/zh/guides/common-tips.md b/docs/zh/guides/common-tips.md index d6604a8ba..3c7c80745 100644 --- a/docs/zh/guides/common-tips.md +++ b/docs/zh/guides/common-tips.md @@ -65,7 +65,6 @@ it('render text', done => { 可以在[测试异步行为](../guides/README.md#测试异步行为)了解更多。 - ### 断言触发的事件 每个挂载的包裹器都会通过其背后的 Vue 实例自动记录所有被触发的事件。你可以用 `wrapper.emitted()` 方法取回这些事件记录。 diff --git a/docs/zh/guides/getting-started.md b/docs/zh/guides/getting-started.md index bb5eea9c3..70f35f93b 100644 --- a/docs/zh/guides/getting-started.md +++ b/docs/zh/guides/getting-started.md @@ -126,7 +126,7 @@ it('button click should increment the count', () => { 任何导致操作 DOM 的改变都应该在断言之前 await `nextTick` 函数。因为 Vue 会对未生效的 DOM 进行批量*异步更新*,避免因数据反复变化而导致不必要的渲染。 -*你可以阅读[Vue 文档](https://cn.vuejs.org/v2/guide/reactivity.html#异步更新队列)了解更多关于异步指更新的信息。* +_你可以阅读[Vue 文档](https://cn.vuejs.org/v2/guide/reactivity.html#异步更新队列)了解更多关于异步指更新的信息。_ 在更新响应式 property 之后,我们可以直接 await 类似 `trigger` 或 `trigger.vm.$nextTick` 方法,等待 Vue 完成 DOM 更新。在这个计数器的示例中,设置 `count` property 会在运行下一个 tick 之后引发 DOM 变化。 @@ -177,7 +177,6 @@ it('will catch the error using async/await', async () => { ### 接下来 - - 移步[编写测试的常见技巧](./README.md#明白要测试的是什么)以学习更多。 - [选择一个测试运行器](./README.md#选择一个测试运行器)以把 Vue Test Utils 集成到你的工程里。 - 学习更多[异步测试行为](./README.md#异步测试行为)