-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
assertVue*() methods support Vue 3 composition API (#969)
If Vue's composition API used, reactive data and computed props cannot be inspected through these methods. When fetching a component prop, attempt these paths: 1. el.__vue__.key * Vue 2 2. el.__vueParentComponent.ctx.key * Vue 3 options API * Vue 3 composition API for definedProps() 3. el.__vueParentComponent.setupState.key * Vue 3 composition API reactive(), computed(), or any other <script setup> variables. If the ctx key is undefined, the setupState fallback is attempted. Wrap in a try/catch for attempts to access undefined nested props which could throw an error.
- Loading branch information
Showing
2 changed files
with
34 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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