diff --git a/docs/api/index.md b/docs/api/index.md index b8a5bd61b..c263deb76 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -1436,7 +1436,7 @@ isVisible(): boolean **Details:** ::: warning -`isVisible()` only works correctly if the wrapper is attached to the DOM using [`attachTo`](#attachto) +`isVisible()` only works correctly if the wrapper is attached to the DOM using [`attachTo`](#attachTo) ::: ```js @@ -1445,9 +1445,11 @@ const Component = { } test('isVisible', () => { - const wrapper = mount(Component) + const wrapper = mount(Component, { + attachTo: document.body + }); - expect(wrapper.find('span').isVisible()).toBe(false) + expect(wrapper.find('span').isVisible()).toBe(false); }) ``` diff --git a/docs/fr/api/index.md b/docs/fr/api/index.md index eafb8e41e..b59fad774 100644 --- a/docs/fr/api/index.md +++ b/docs/fr/api/index.md @@ -1429,13 +1429,19 @@ isVisible(): boolean **Utilisation :** +::: warning +`isVisible()` ne fonctionne correctement que si le wrapper est attaché au DOM en utilisant [`attachTo`](#attachTo) +::: + ```js const Component = { template: `