Skip to content

Commit dd36ddc

Browse files
committed
Merge branch 'vuejs:dev' into dev
2 parents 792d267 + 83aa823 commit dd36ddc

File tree

31 files changed

+751
-157
lines changed

31 files changed

+751
-157
lines changed

docs/.vuepress/config.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ module.exports = {
6060
items: [
6161
{
6262
text: '2.x-beta',
63-
link:
64-
'https://vuejs.github.io/vue-test-utils-next-docs/guide/introduction.html'
63+
link: 'https://next.vue-test-utils.vuejs.org/guide/'
6564
}
6665
]
6766
},
@@ -96,8 +95,7 @@ module.exports = {
9695
items: [
9796
{
9897
text: '2.x-beta',
99-
link:
100-
'https://vuejs.github.io/vue-test-utils-next-docs/guide/introduction.html'
98+
link: 'https://next.vue-test-utils.vuejs.org/guide/'
10199
}
102100
]
103101
}
@@ -128,8 +126,7 @@ module.exports = {
128126
items: [
129127
{
130128
text: '2.x-beta',
131-
link:
132-
'https://vuejs.github.io/vue-test-utils-next-docs/guide/introduction.html'
129+
link: 'https://next.vue-test-utils.vuejs.org/guide/'
133130
}
134131
]
135132
}
@@ -160,8 +157,7 @@ module.exports = {
160157
items: [
161158
{
162159
text: '2.x-beta',
163-
link:
164-
'https://vuejs.github.io/vue-test-utils-next-docs/guide/introduction.html'
160+
link: 'https://next.vue-test-utils.vuejs.org/guide/'
165161
}
166162
]
167163
}

docs/api/components/RouterLinkStub.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ const wrapper = mount(Component, {
1616
RouterLink: RouterLinkStub
1717
}
1818
})
19-
expect(wrapper.find(RouterLinkStub).props().to).toBe('/some/path')
19+
expect(wrapper.findComponent(RouterLinkStub).props().to).toBe('/some/path')
2020
```

docs/api/wrapper-array/contains.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### contains
1+
## contains
22

33
Assert every wrapper in `WrapperArray` contains selector.
44

docs/api/wrapper/name.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## name
22

33
::: warning Deprecation warning
4-
`name` is deprecated and will be removed in future releases.
4+
`name` is deprecated and will be removed in future releases. See [vue-test-utils.vuejs.org/upgrading-to-v1/#name](https://vue-test-utils.vuejs.org/upgrading-to-v1/#name)
55
:::
66

77
Returns component name if `Wrapper` contains a Vue instance, or the tag name of `Wrapper` DOM node if `Wrapper` does not contain a Vue instance.

docs/api/wrapper/trigger.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ test('trigger demo', async () => {
3838
})
3939
```
4040

41+
::: tip
42+
When using `trigger('focus')` with [jsdom v16.4.0](https://github.com/jsdom/jsdom/releases/tag/16.4.0) and above you must use the [attachTo](../options.md#attachto) option when mounting the component. This is because a bug fix in [jsdom v16.4.0](https://github.com/jsdom/jsdom/releases/tag/16.4.0) changed `el.focus()` to do nothing on elements that are disconnected from the DOM.
43+
:::
44+
4145
- **Setting the event target:**
4246

4347
Under the hood, `trigger` creates an `Event` object and dispatches the event on the Wrapper element.

docs/ja/api/components/RouterLinkStub.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ const wrapper = mount(Component, {
1616
RouterLink: RouterLinkStub
1717
}
1818
})
19-
expect(wrapper.find(RouterLinkStub).props().to).toBe('/some/path')
19+
expect(wrapper.findComponent(RouterLinkStub).props().to).toBe('/some/path')
2020
```

docs/ru/api/components/RouterLinkStub.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ const wrapper = mount(Component, {
1616
RouterLink: RouterLinkStub
1717
}
1818
})
19-
expect(wrapper.find(RouterLinkStub).props().to).toBe('/some/path')
19+
expect(wrapper.findComponent(RouterLinkStub).props().to).toBe('/some/path')
2020
```

docs/ru/guides/testing-async-components.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export default {
4444
```js
4545
import { shallowMount } from '@vue/test-utils'
4646
import Foo from './Foo'
47-
jest.mock('axios')
47+
jest.mock('axios', () => ({
48+
get: Promise.resolve({ data: 'value' })
49+
}))
4850

4951
it('делает асинхронный запрос при нажатии кнопки', () => {
5052
const wrapper = shallowMount(Foo)

docs/zh/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 介绍
22

33
::: warning
4-
本文档基于 Vue2.x,新版本文档请移步至[这里](https://vue-test-utils.vuejs.org/v2/guide/introduction.html)
4+
本文档基于 Vue2.x,新版本文档请移步至[这里](https://next.vue-test-utils.vuejs.org/guide/)
55
:::
66

77
Vue Test Utils 是 Vue.js 官方的单元测试实用工具库。

docs/zh/api/components/RouterLinkStub.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ const wrapper = mount(Component, {
1616
RouterLink: RouterLinkStub
1717
}
1818
})
19-
expect(wrapper.find(RouterLinkStub).props().to).toBe('/some/path')
19+
expect(wrapper.findComponent(RouterLinkStub).props().to).toBe('/some/path')
2020
```

0 commit comments

Comments
 (0)