From fc4082ad38e283177d035d3fcfc314e1ee527e7c Mon Sep 17 00:00:00 2001 From: ArtemTropanets <36934520+ArtemTropanets@users.noreply.github.com> Date: Mon, 4 Dec 2023 04:40:56 +0200 Subject: [PATCH] docs(api): add note for attachTo Add explanation about mounting mechanism. This information is available in v1 docs, but not in current. --- docs/api/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/api/index.md b/docs/api/index.md index eb27e9abd..b8a5bd61b 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -81,6 +81,8 @@ attachTo?: HTMLElement | string Can be a valid CSS selector, or an [`Element`](https://developer.mozilla.org/en-US/docs/Web/API/Element) connected to the document. +Note that the component is appended to the node, it doesn't replace the whole content of the node. If you mount the component on the same node in multiple tests - make sure to unmount it after each test by calling `wrapper.unmount()`, this will remove the rendered elements from the node. + `Component.vue`: ```vue