Skip to content

Commit 2c1bfb8

Browse files
authored
docs: improve parentComponent example (#963)
1 parent 71ec3b9 commit 2c1bfb8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/api/options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ import Foo from './Foo.vue'
254254
const wrapper = shallowMount(Component, {
255255
parentComponent: Foo
256256
})
257-
expect(wrapper.vm.$parent.name).toBe('foo')
257+
expect(wrapper.vm.$parent.$options.name).toBe('foo')
258258
```
259259

260260
## provide

docs/ja/api/options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ import Foo from './Foo.vue'
222222
const wrapper = shallowMount(Component, {
223223
parentComponent: Foo
224224
})
225-
expect(wrapper.vm.$parent.name).toBe('foo')
225+
expect(wrapper.vm.$parent.$options.name).toBe('foo')
226226
```
227227

228228
## provide

docs/ru/api/options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ import Foo from './Foo.vue'
245245
const wrapper = shallowMount(Component, {
246246
parentComponent: Foo
247247
})
248-
expect(wrapper.vm.$parent.name).toBe('foo')
248+
expect(wrapper.vm.$parent.$options.name).toBe('foo')
249249
```
250250

251251
## provide

docs/zh/api/options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ import Foo from './Foo.vue'
197197
const wrapper = shallowMount(Component, {
198198
parentComponent: Foo
199199
})
200-
expect(wrapper.vm.$parent.name).toBe('foo')
200+
expect(wrapper.vm.$parent.$options.name).toBe('foo')
201201
```
202202

203203
## provide

0 commit comments

Comments
 (0)