Repository navigation
fix: only apply stubs to the app being rendered - #2997
Merged
Merged
Conversation
✅ Deploy Preview for vue-test-utils-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
Member
|
@ValentinYoushkevich would you mind rebasing the branch please? I'll merge when done |
ValentinYoushkevich
force-pushed
the
fix/stubs-per-app
branch
from
November 6, 2026 06:17
cbd56a9 to
1f6326c
Compare
Contributor
Author
|
Done |
raddatzk
added a commit
to raddatzk/veyq
that referenced
this pull request
Nov 22, 2026
@vue/test-utils 2.6.0 applies a mount's `stubs` to that app alone (vuejs/test-utils#2997). The "Not you?" case relied on the old leak: the confirmation dialog mounted beside the page unstubbed the page's VeyqDialog, so the name prompt teleported into document.body. Now it renders in place as the stub, like the sibling cases read it, and the body assertion saw ''. Co-Authored-By: Claude Opus 5.5 <[email protected]>
raddatzk
added a commit
to raddatzk/veyq
that referenced
this pull request
Nov 22, 2026
…4 updates (#38) * chore(deps): bump the npm-minor-patch group across 1 directory with 14 updates Bumps the npm-minor-patch group with 14 updates in the / directory: | Package | From | To | | --- | --- | --- | | [eslint](https://github.com/eslint/eslint) | `10.14.0` | `10.15.0` | | [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.72.1` | `8.73.0` | | [@lucide/vue](https://github.com/lucide-icons/lucide/tree/HEAD/packages/vue) | `1.68.0` | `1.74.0` | | [vue](https://github.com/vuejs/core) | `3.5.44` | `3.5.45` | | [vue-i18n](https://github.com/intlify/vue-i18n/tree/HEAD/packages/vue-i18n) | `11.4.18` | `11.4.22` | | [vue-router](https://github.com/vuejs/router) | `5.4.0` | `5.5.1` | | [@intlify/message-compiler](https://github.com/intlify/vue-i18n/tree/HEAD/packages/message-compiler) | `11.4.18` | `11.4.22` | | [@openapitools/openapi-generator-cli](https://github.com/OpenAPITools/openapi-generator-cli) | `2.42.0` | `2.42.2` | | [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/HEAD/packages/plugin-vue) | `6.0.10` | `6.0.11` | | [@vue/test-utils](https://github.com/vuejs/test-utils) | `2.5.1` | `2.6.0` | | [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) | `10.12.0` | `10.12.1` | | [fake-indexeddb](https://github.com/dumbmatter/fakeIndexedDB) | `6.2.7` | `6.2.8` | | [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `8.3.5` | `8.3.8` | | [vue-eslint-parser](https://github.com/vuejs/vue-eslint-parser) | `10.4.1` | `10.4.2` | Updates `eslint` from 10.14.0 to 10.15.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](eslint/eslint@v10.14.0...v10.15.0) Updates `typescript-eslint` from 8.72.1 to 8.73.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.73.0/packages/typescript-eslint) Updates `@lucide/vue` from 1.68.0 to 1.74.0 - [Release notes](https://github.com/lucide-icons/lucide/releases) - [Commits](https://github.com/lucide-icons/lucide/commits/1.74.0/packages/vue) Updates `vue` from 3.5.44 to 3.5.45 - [Release notes](https://github.com/vuejs/core/releases) - [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md) - [Commits](vuejs/core@v3.5.44...v3.5.45) Updates `vue-i18n` from 11.4.18 to 11.4.22 - [Release notes](https://github.com/intlify/vue-i18n/releases) - [Changelog](https://github.com/intlify/vue-i18n/blob/v11.4.22/CHANGELOG.md) - [Commits](https://github.com/intlify/vue-i18n/commits/v11.4.22/packages/vue-i18n) Updates `vue-router` from 5.4.0 to 5.5.1 - [Release notes](https://github.com/vuejs/router/releases) - [Commits](vuejs/router@v5.4.0...v5.5.1) Updates `@intlify/message-compiler` from 11.4.18 to 11.4.22 - [Release notes](https://github.com/intlify/vue-i18n/releases) - [Changelog](https://github.com/intlify/vue-i18n/blob/v11.4.22/CHANGELOG.md) - [Commits](https://github.com/intlify/vue-i18n/commits/v11.4.22/packages/message-compiler) Updates `@openapitools/openapi-generator-cli` from 2.42.0 to 2.42.2 - [Release notes](https://github.com/OpenAPITools/openapi-generator-cli/releases) - [Commits](OpenAPITools/openapi-generator-cli@v2.42.0...v2.42.2) Updates `@vitejs/plugin-vue` from 6.0.10 to 6.0.11 - [Release notes](https://github.com/vitejs/vite-plugin-vue/releases) - [Changelog](https://github.com/vitejs/vite-plugin-vue/blob/main/packages/plugin-vue/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite-plugin-vue/commits/[email protected]/packages/plugin-vue) Updates `@vue/test-utils` from 2.5.1 to 2.6.0 - [Release notes](https://github.com/vuejs/test-utils/releases) - [Commits](vuejs/test-utils@v2.5.1...v2.6.0) Updates `eslint-plugin-vue` from 10.12.0 to 10.12.1 - [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases) - [Changelog](https://github.com/vuejs/eslint-plugin-vue/blob/master/CHANGELOG.md) - [Commits](vuejs/eslint-plugin-vue@v10.12.0...v10.12.1) Updates `fake-indexeddb` from 6.2.7 to 6.2.8 - [Release notes](https://github.com/dumbmatter/fakeIndexedDB/releases) - [Changelog](https://github.com/dumbmatter/fakeIndexedDB/blob/master/CHANGELOG.md) - [Commits](dumbmatter/fakeIndexedDB@v6.2.7...v6.2.8) Updates `vite` from 8.3.5 to 8.3.8 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v8.3.8/packages/vite) Updates `vue-eslint-parser` from 10.4.1 to 10.4.2 - [Release notes](https://github.com/vuejs/vue-eslint-parser/releases) - [Commits](vuejs/vue-eslint-parser@v10.4.1...v10.4.2) --- updated-dependencies: - dependency-name: eslint dependency-version: 10.15.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-minor-patch - dependency-name: typescript-eslint dependency-version: 8.73.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-minor-patch - dependency-name: "@lucide/vue" dependency-version: 1.74.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: npm-minor-patch - dependency-name: vue dependency-version: 3.5.45 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: npm-minor-patch - dependency-name: vue-i18n dependency-version: 11.4.22 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: npm-minor-patch - dependency-name: vue-router dependency-version: 5.5.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: npm-minor-patch - dependency-name: "@intlify/message-compiler" dependency-version: 11.4.22 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-minor-patch - dependency-name: "@openapitools/openapi-generator-cli" dependency-version: 2.42.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-minor-patch - dependency-name: "@vitejs/plugin-vue" dependency-version: 6.0.11 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-minor-patch - dependency-name: "@vue/test-utils" dependency-version: 2.6.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-minor-patch - dependency-name: eslint-plugin-vue dependency-version: 10.12.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-minor-patch - dependency-name: fake-indexeddb dependency-version: 6.2.8 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-minor-patch - dependency-name: vite dependency-version: 8.3.8 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-minor-patch - dependency-name: vue-eslint-parser dependency-version: 10.4.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-minor-patch ... Signed-off-by: dependabot[bot] <[email protected]> * test(web): read the re-asked name where test-utils 2.6 draws it @vue/test-utils 2.6.0 applies a mount's `stubs` to that app alone (vuejs/test-utils#2997). The "Not you?" case relied on the old leak: the confirmation dialog mounted beside the page unstubbed the page's VeyqDialog, so the name prompt teleported into document.body. Now it renders in place as the stub, like the sibling cases read it, and the body assertion saw ''. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kevin Raddatz <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
mount,shallowMountandrenderToStringinstall their stubs with Vue's globaltransformVNodeArgsand never remove them, so any other app rendered later in the same file still gets stubbed, even afterunmount():The same happens with
createSSRApp+@vue/server-renderer(<transition-stub>in the server HTML, hydration mismatch), and a wrapper mounted earlier re-renders with the stubs of the last mounted one. Repro: playground (2.5.1), playground (main)The transformer of each app is now stored in a
WeakMapkeyed by the app, and a single dispatcher installed withtransformVNodeArgsapplies the one of the app being rendered (vnodes created outside of any component still use the last mounted wrapper's transformer). Since every transformer now only sees its own app, themountedRootComponentsset from #2890 is no longer needed and is removed (the #2675 test still passes). Note that components rendered by another app, e.g. one created withcreateAppinside a component, are no longer stubbed.Projects working around this in their tests: