From 0ad10de2116caed660c1452892f7f6e0a327b91b Mon Sep 17 00:00:00 2001 From: czk694253817 <694253817@qq.com> Date: Fri, 11 Mar 2022 16:13:44 +0800 Subject: [PATCH] Update render.md Text cannot be used in actual use. It can be used normally only by replacing it with HTML --- docs/zh/api/render.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/zh/api/render.md b/docs/zh/api/render.md index 8ec5a9569..2fbfeefcf 100644 --- a/docs/zh/api/render.md +++ b/docs/zh/api/render.md @@ -38,7 +38,7 @@ import Foo from './Foo.vue' describe('Foo', () => { it('renders a div', async () => { const wrapper = await render(Foo) - expect(wrapper.text()).toContain('
') + expect(wrapper.html()).toContain('') }) }) ``` @@ -56,7 +56,7 @@ describe('Foo', () => { color: 'red' } }) - expect(wrapper.text()).toContain('red') + expect(wrapper.html()).toContain('red') }) }) ``` @@ -78,7 +78,7 @@ describe('Foo', () => { foo: '' } }) - expect(wrapper.text()).toContain('') + expect(wrapper.html()).toContain('') }) }) ``` @@ -97,7 +97,7 @@ describe('Foo', () => { $route } }) - expect(wrapper.text()).toContain($route.path) + expect(wrapper.html()).toContain($route.path) }) }) ```