Skip to content

Commit ab35fab

Browse files
authored
docs: Missing Vue import (#1445)
* Missing Vue import `import Vue` was missing in the code block. when someone, new to vue tries to follow the guide, it becomes a pain-point to figure why test case which included `Vue.nextTick()` failed. * Update testing-async-components.md
1 parent 24ed9f9 commit ab35fab

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ In practice, this means you have to use `Vue.nextTick()` to wait until Vue has p
1616
The easiest way to use `Vue.nextTick()` is to write your tests in an async function:
1717

1818
```js
19+
// import Vue at the top of file
20+
import Vue from 'vue'
21+
22+
// other code snippet...
23+
24+
// inside test-suite, add this test case
1925
it('button click should increment the count text', async () => {
2026
expect(wrapper.text()).toContain('0')
2127
const button = wrapper.find('button')

0 commit comments

Comments
 (0)