From fa9b8370b9865f10d24c7910153c24db254c72e2 Mon Sep 17 00:00:00 2001 From: eddyerburgh Date: Sat, 8 Sep 2018 08:31:52 +0100 Subject: [PATCH] docs: improve parentComponent example --- docs/api/options.md | 2 +- docs/ja/api/options.md | 2 +- docs/ru/api/options.md | 2 +- docs/zh/api/options.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/options.md b/docs/api/options.md index dfb00d1ca..35eaebae2 100644 --- a/docs/api/options.md +++ b/docs/api/options.md @@ -254,7 +254,7 @@ import Foo from './Foo.vue' const wrapper = shallowMount(Component, { parentComponent: Foo }) -expect(wrapper.vm.$parent.name).toBe('foo') +expect(wrapper.vm.$parent.$options.name).toBe('foo') ``` ## provide diff --git a/docs/ja/api/options.md b/docs/ja/api/options.md index 43400dd76..932aee94c 100644 --- a/docs/ja/api/options.md +++ b/docs/ja/api/options.md @@ -222,7 +222,7 @@ import Foo from './Foo.vue' const wrapper = shallowMount(Component, { parentComponent: Foo }) -expect(wrapper.vm.$parent.name).toBe('foo') +expect(wrapper.vm.$parent.$options.name).toBe('foo') ``` ## provide diff --git a/docs/ru/api/options.md b/docs/ru/api/options.md index b4ab04725..840e8f938 100644 --- a/docs/ru/api/options.md +++ b/docs/ru/api/options.md @@ -245,7 +245,7 @@ import Foo from './Foo.vue' const wrapper = shallowMount(Component, { parentComponent: Foo }) -expect(wrapper.vm.$parent.name).toBe('foo') +expect(wrapper.vm.$parent.$options.name).toBe('foo') ``` ## provide diff --git a/docs/zh/api/options.md b/docs/zh/api/options.md index b02cda261..42485b56d 100644 --- a/docs/zh/api/options.md +++ b/docs/zh/api/options.md @@ -197,7 +197,7 @@ import Foo from './Foo.vue' const wrapper = shallowMount(Component, { parentComponent: Foo }) -expect(wrapper.vm.$parent.name).toBe('foo') +expect(wrapper.vm.$parent.$options.name).toBe('foo') ``` ## provide