Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/fr/guide/advanced/teleport.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,20 @@ test('teleport', async () => {
});
```

Vous pouvez remplacer teleport par un stub en utilisant `teleport: true`:
```ts
import { mount } from '@vue/test-utils'
import Navbar from './Navbar.vue'

test('teleport', async () => {
const wrapper = mount(Navbar, {
stubs: {
teleport: true
}
})
})
```

## Conclusion

- Créez une cible de téléportation avec `document.createElement`.
Expand Down
15 changes: 15 additions & 0 deletions docs/guide/advanced/teleport.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,21 @@ test('teleport', async () => {
})
```

You can stub teleport by using `teleport: true`:

```ts
import { mount } from '@vue/test-utils'
import Navbar from './Navbar.vue'

test('teleport', async () => {
const wrapper = mount(Navbar, {
stubs: {
teleport: true
}
})
})
```

## Conclusion

- Create a teleport target with `document.createElement`.
Expand Down