Repository navigation
fix: tolerate duplicate attachTo cleanup - #2830
Merged
danielroe merged 1 commit intoApr 24, 2026
Merged
Conversation
Regression introduced by vuejs#2700. Without this guard, auto-unmounting a manually unmounted wrapper attached to document.body throws `NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.`
✅ Deploy Preview for vue-test-utils-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
danielroe
approved these changes
Apr 24, 2026
yeongsheng-tan
added a commit
to nerds-odd-e/doughnut
that referenced
this pull request
Apr 24, 2026
…ssion @vue/test-utils 2.4.7/2.4.8 added an `app.onUnmount(() => to.removeChild(el))` callback (vuejs/test-utils#2700) that throws NotFoundError in two scenarios that our suite relies on: - @testing-library/vue's render() calls `unwrapNode()` right after mount, detaching VTU's wrapper <div> from its parent before Vue's unmount hook runs -> every render()-based spec fails. - Double-unmount (manual wrapper.unmount() plus an afterEach fallback) re-fires the hook with el already detached. Both surface as `[Vue warn]: Unhandled error during execution of app unmount cleanup function`, which setupVitest intentionally rethrows, producing 216 failures across 25 spec files. - Pin @vue/test-utils back to 2.4.6 in frontend/package.json. - Add a TODO in frontend/tests/setupVitest.ts to re-bump once the upstream fix (vuejs/test-utils#2830) ships as 2.4.9. - Harden FullScreen.spec.ts so its afterEach never double-unmounts, which keeps the test correct regardless of VTU version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Regression introduced by #2700.
Without this guard, auto-unmounting a manually unmounted wrapper attached to document.body throws
NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.