File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,20 @@ test('teleport', async () => {
188188});
189189```
190190
191+ Vous pouvez remplacer teleport par un stub en utilisant ` teleport: true ` :
192+ ``` ts
193+ import { mount } from ' @vue/test-utils'
194+ import Navbar from ' ./Navbar.vue'
195+
196+ test (' teleport' , async () => {
197+ const wrapper = mount (Navbar , {
198+ stubs: {
199+ teleport: true
200+ }
201+ })
202+ })
203+ ```
204+
191205## Conclusion
192206
193207- Créez une cible de téléportation avec ` document.createElement ` .
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ test('teleport', async () => {
187187})
188188```
189189
190- You have a possibility to stub teleport without creating any external HTML
190+ You can stub teleport by using ` teleport: true ` :
191191
192192``` ts
193193import { mount } from ' @vue/test-utils'
@@ -200,7 +200,6 @@ test('teleport', async () => {
200200 }
201201 })
202202})
203-
204203```
205204
206205## Conclusion
You can’t perform that action at this time.
0 commit comments