Repository navigation
Conversation
👷 Deploy request for vue-test-utils-docs pending review.Visit the deploys page to approve it
|
commit: |
cexbrayat
approved these changes
Nov 25, 2026
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.
Since #2996 (2.6.0), a component rendered under an app context whose
componentsisnullthrows in the stubs transformer:(The key is the first configured stub,
transitionwith the default config. With no stubs configured at all it isInvalid value used as weak map keyinstead.)element-plus builds such a context for the table's overflow tooltip:
vm.appContext = { ...table.appContext, ...table }. Spreading the instance replacescomponentswith the instance'snull. Vue itself tolerates that (resolveAssetskips a missing registry), and 2.5.1 renders it fine. With 2.6.0, 13 of the 93 tests in element-plus'table.test.tsfail (the first throw also breaks later mounts in the file); with this patch all 93 pass.The lookup added in #2996 passes
instance.appContext.componentsstraight togetGlobalStubKey, which reads keys from it and uses it as aWeakMapkey. This skips the lookup when there is no registry (2.5.1 had no such lookup at all). Stubs by name still apply under such a context.Playground (2.6.0): https://play.vuejs.org/#eNqdVU2P2zYQ/SsDXUQhMhUUbQ/C7iLFYoEWSHponJx0CCPRlrIUqfLD7sLxf++QFC3bu0GC+CCL5Hw8vnkzOmR/TBPdOZ7V2Y1p9TBZMNy66a6RwzgpbeHQSIBWc2Y52pbL6uPfquNh3fHNIPm9QgfJpQ17W27vnda4/Esay2QbTfvw1Hwz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