You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: <div> wrapper not cleaned up on unmount #2690
In #219 it was raised that with the Vue 3 upgrade, Vue Test Utils will no longer mount directly to the target provided by the attachTo option, but to a child div element appended to the target. However, the unmount function was never updated to account for this. Both when manually calling unmount, and when using enableAutoUnmount, Vue Test Utils leaves behind the div element it created to mount the component.
This makes it infeasible to use attachTo on the same target in multiple tests, as you end up with a large list of div elements appended to the target from previous tests. Ideally unmount should drop the wrapper element that mount creates so that the mount target is left in a clean state.
Activity
cexbrayat commentedon Jul 16, 2025
Hi @EwenDC
Thanks for the repro. Would you like to try to solve this with a PR? We would be glad to review it and merge it.
fix: remove wrapper div when unmount (#2700)