Skip to content

Commit dcfee27

Browse files
author
Jess
committed
(docs): apply feedback and fix typos
1 parent 5269548 commit dcfee27

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/guides/common-tips.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ _For a full list of options, please see the [mount options section](../api/optio
176176

177177
### Mocking Transitions
178178

179-
Although calling `await Vue.nexTick()` works well for most use cases, there are some situations where additional work arounds are required. These issues will be solved before the library transitions out of beta. One such example is unit testing components with the `<transition>` wrapper provided by Vue.
179+
Although calling `await Vue.nextTick()` works well for most use cases, there are some situations where additional workarounds are required. These issues will be solved before the `vue-test-utils` library moves out of beta. One such example is unit testing components with the `<transition>` wrapper provided by Vue.
180180

181181
```vue
182182
<template>
@@ -214,9 +214,9 @@ test('should render Foo, then hide it', async () => {
214214
})
215215
```
216216

217-
In practice, although we are calling `setData` then waiting for the `nextTick` to ensure the DOM is updated, this test fails. This is an ongoing issue related to show Vue implements the `<transition`> component, that we would like to solve before version 1.0. For now, there are some work arounds:
217+
In practice, although we are calling `setData` then waiting for the `nextTick` to ensure the DOM is updated, this test fails. This is an ongoing issue related to show Vue implements the `<transition>` component, that we would like to solve before version 1.0. For now, there are some workarounds:
218218

219-
1. Using a `transitionStub` helper
219+
#### Using a `transitionStub` helper
220220

221221
```js
222222
const transitionStub = () => ({
@@ -244,6 +244,8 @@ test('should render Foo, then hide it', async () => {
244244

245245
This overrides the default behavior of the `<transition>` component and renders the children as soon as the relevant boolean condition changes, as opposed to applying CSS classes, which is how Vue's `<transition>` component works.
246246

247+
#### Avoid `setData`
248+
247249
Another alternative is to simply avoid using `setData` by writing two tests, with the required setup performed using `mount` or `shallowMount` options:
248250

249251
```js

0 commit comments

Comments
 (0)