Skip to content

Commit 0ad10de

Browse files
authored
Update render.md
Text cannot be used in actual use. It can be used normally only by replacing it with HTML
1 parent caf55eb commit 0ad10de

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/zh/api/render.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import Foo from './Foo.vue'
3838
describe('Foo', () => {
3939
it('renders a div', async () => {
4040
const wrapper = await render(Foo)
41-
expect(wrapper.text()).toContain('<div></div>')
41+
expect(wrapper.html()).toContain('<div></div>')
4242
})
4343
})
4444
```
@@ -56,7 +56,7 @@ describe('Foo', () => {
5656
color: 'red'
5757
}
5858
})
59-
expect(wrapper.text()).toContain('red')
59+
expect(wrapper.html()).toContain('red')
6060
})
6161
})
6262
```
@@ -78,7 +78,7 @@ describe('Foo', () => {
7878
foo: '<div />'
7979
}
8080
})
81-
expect(wrapper.text()).toContain('<div></div>')
81+
expect(wrapper.html()).toContain('<div></div>')
8282
})
8383
})
8484
```
@@ -97,7 +97,7 @@ describe('Foo', () => {
9797
$route
9898
}
9999
})
100-
expect(wrapper.text()).toContain($route.path)
100+
expect(wrapper.html()).toContain($route.path)
101101
})
102102
})
103103
```

0 commit comments

Comments
 (0)